本文整理汇总了TypeScript中collection-utils.addHashCode函数的典型用法代码示例。如果您正苦于以下问题:TypeScript addHashCode函数的具体用法?TypeScript addHashCode怎么用?TypeScript addHashCode使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了addHashCode函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor(private readonly _kind: TypeKind, private readonly _components: ReadonlyArray<any>) {
let h = hashCodeInit;
h = addHashCode(h, hashCodeOf(this._kind));
for (const c of _components) {
h = addHashCode(h, hashCodeOf(c));
}
this._hashCode = h;
}
示例2: hashCode
hashCode(): number {
let h = super.hashCode();
h = addHashCode(h, hashCodeOf(this.nullTransformer));
h = addHashCode(h, hashCodeOf(this.integerTransformer));
h = addHashCode(h, hashCodeOf(this.doubleTransformer));
h = addHashCode(h, hashCodeOf(this.boolTransformer));
h = addHashCode(h, hashCodeOf(this.stringTransformer));
h = addHashCode(h, hashCodeOf(this.arrayTransformer));
h = addHashCode(h, hashCodeOf(this.objectTransformer));
return h;
}