/** * Constructs a new pair of the given two objects, inferring generic types. * * @param first the first item to store in the pair * @param second the second item to store in the pair * @param <S> the type of the first item * @param <T> the type of the second item * @return a new pair wrapping the two items */ public static <S,T> Pair<S,T> of(S first, T second) { return new Pair<S,T>(first,second); }