export class Tuple { constructor(public first: T, public second: U) {} public get(): [T, U] { return [this.first, this.second]; } public switchGet(elem: any): any{ if(elem == this.first){ return this.second; } else { return this.first; } } }