package jrummikub.util; /** * A pair of objects * * @param * Type of first component * @param * Type of second component */ public class Pair { private final T1 first; private final T2 second; /** * Create a new pair from two values * * @param first * the first pair component * @param second * the second pair component */ public Pair(T1 first, T2 second) { this.first = first; this.second = second; } /** * Extract the first component of a pair * * @return the first pair component */ public T1 getFirst() { return first; } /** * Extract the second component of a pair * * @return the second pair component */ public T2 getSecond() { return second; } }