新增fastList、注释完善
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user