19 lines
186 B
Java
19 lines
186 B
Java
class Pair<T, U> {
|
|
T x;
|
|
U y;
|
|
|
|
public Pair() { }
|
|
public Pair(T x, U y) {
|
|
this.x = x;
|
|
this.y = y;
|
|
}
|
|
|
|
public T fst () {
|
|
return x;
|
|
}
|
|
|
|
public U snd () {
|
|
return y;
|
|
}
|
|
}
|