Pair
A generic class for storing a pair of objects. This is a simple utility class that holds two values of potentially different types, A and B.
Type Parameters
<A>: The type of the first element in the pair.<B>: The type of the second element in the pair.
Methods
Pair(A a, B b)
Constructs a new Pair with the specified first (a) and second (b) elements.
Pair(Pair<A, B> pair)
Constructs a new Pair by copying the elements from an existing pair.
getA()
Returns the first element of the pair.
getB()
Returns the second element of the pair.