// A simple class of generic pairs. We can use a Pair // object to associate an object of type A with an object of type B. public class Pair { private A first; private B second; public Pair(A a, B b) { first = a; second = b; } public A getFirst() { return first; } public B getSecond() { return second; } public void setFirst(A a) { first = a; } public void setSecond(B b) { second = b; } }