本文整理汇总了TypeScript中@angular/facade.ListWrapper类的典型用法代码示例。如果您正苦于以下问题:TypeScript ListWrapper类的具体用法?TypeScript ListWrapper怎么用?TypeScript ListWrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ListWrapper类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: remove
remove(key: string) {
if (!StringWrapper.contains(key, '.')) {
return this._data.delete(key);
}
var pieces = key.split('.');
var last = ListWrapper.last(pieces);
pieces.length = pieces.length - 1;
var target = this._resolve(pieces, this);
return target.remove(last);
}
开发者ID:0xJoKe,项目名称:angular,代码行数:10,代码来源:common.ts
示例2: set
set(key: string, value) {
if (key.indexOf('.') == -1) {
this._data[key] = value;
return;
}
var pieces = key.split('.');
var last = ListWrapper.last(pieces);
pieces.length = pieces.length - 1;
var target = this._resolve(pieces, this);
target[last] = value;
}
开发者ID:0xJoKe,项目名称:angular,代码行数:11,代码来源:common.ts
示例3: get
get(key: string) {
if (key.indexOf('.') == -1) {
return this._data[key];
}
var pieces = key.split('.');
var last = ListWrapper.last(pieces);
pieces.length = pieces.length - 1;
var target = this._resolve(pieces, this);
if (target == null) {
return null;
}
return target[last];
}
开发者ID:0xJoKe,项目名称:angular,代码行数:13,代码来源:common.ts
示例4: _computeStageButtons
_computeStageButtons() {
var disabled = true;
this.stages = ListWrapper.clone(STATUS_LIST.map((status) => {
var isCurrent = this._offering.status == status;
var stage = new Stage();
stage.name = status;
stage.isDisabled = disabled;
stage.backgroundColor = disabled ? '#DDD' : isCurrent ? '#DDF' : '#FDD';
if (isCurrent) {
disabled = false;
}
return stage;
}));
}
开发者ID:0xJoKe,项目名称:angular,代码行数:14,代码来源:cells.ts
示例5: validate
validate(completeSample: MeasureValues[]): MeasureValues[] {
if (completeSample.length >= this._sampleSize) {
var latestSample = ListWrapper.slice(completeSample, completeSample.length - this._sampleSize,
completeSample.length);
var xValues = [];
var yValues = [];
for (var i = 0; i < latestSample.length; i++) {
// For now, we only use the array index as x value.
// TODO(tbosch): think about whether we should use time here instead
xValues.push(i);
yValues.push(latestSample[i].values[this._metric]);
}
var regressionSlope = Statistic.calculateRegressionSlope(
xValues, Statistic.calculateMean(xValues), yValues, Statistic.calculateMean(yValues));
return regressionSlope >= 0 ? latestSample : null;
} else {
return null;
}
}
开发者ID:0xJoKe,项目名称:angular,代码行数:19,代码来源:regression_slope_validator.ts
示例6:
(value, cat) => { return value && ListWrapper.contains(eventCategories, cat); }, true);
开发者ID:4vanger,项目名称:angular,代码行数:1,代码来源:chrome_driver_extension.ts
注:本文中的@angular/facade.ListWrapper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论