class Tuple { public final X x; public final Y y; public Tuple(X x,Y y) {this.x=x; this.y=y;} public X getX() { return x; } private static Tuple copy(Tuple t) { return new Tuple(t.x, t.y); } }