新增fastList、注释完善

This commit is contained in:
yhh
2020-10-27 18:08:49 +08:00
parent 0e7b0bc45c
commit fc6a8a0803
19 changed files with 595 additions and 205 deletions

View File

@@ -2,7 +2,7 @@ module es {
/**
* 用于管理一对对象的简单DTO
*/
export class Pair<T> {
export class Pair<T> implements IEquatable<Pair<T>> {
public first: T;
public second: T;
@@ -15,7 +15,8 @@ module es {
this.first = this.second = null;
}
public equals(other: Pair<T>) {
public equals(other: Pair<T>): boolean {
// 这两种方法在功能上应该是等价的
return this.first == other.first && this.second == other.second;
}
}