public class PairArray implements Pair {
private int[] elems;
public PairArray(int first, int second) {
elems = new int[2];
elems[0] = first;
elems[1] = second;
}
public int getFirst() {
return elems[0];
}
public int getSecond() {
return elems[1];
}
public void setFirst(int value) {
elems[0] = value;
}
public void setSecond(int value) {
elems[1]= value;
}
}