Files
esengine/source/src/Utils/Pair.ts

23 lines
487 B
TypeScript
Raw Normal View History

2020-07-23 11:00:46 +08:00
module es {
/**
* DTO
*/
export class Pair<T> {
public first: T;
public second: T;
2020-07-28 16:25:20 +08:00
constructor(first: T, second: T) {
2020-07-23 11:00:46 +08:00
this.first = first;
this.second = second;
}
2020-07-28 16:25:20 +08:00
public clear() {
2020-07-23 11:00:46 +08:00
this.first = this.second = null;
}
2020-07-28 16:25:20 +08:00
public equals(other: Pair<T>) {
2020-07-23 11:00:46 +08:00
return this.first == other.first && this.second == other.second;
}
}
2020-07-23 11:00:46 +08:00
}