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

23 lines
484 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-23 11:00:46 +08:00
constructor(first: T, second: T){
this.first = first;
this.second = second;
}
2020-07-23 11:00:46 +08:00
public clear(){
this.first = this.second = null;
}
2020-07-23 11:00:46 +08:00
public equals(other: Pair<T>){
return this.first == other.first && this.second == other.second;
}
}
2020-07-23 11:00:46 +08:00
}