Class Pair<T1,​T2>

  • Type Parameters:
    T1 - The type of the first member
    T2 - The type of the second member

    public class Pair<T1,​T2>
    extends java.lang.Object
    A simple Pair (or Tuple implementation).
    • Constructor Summary

      Constructors 
      Constructor Description
      Pair​(T1 first, T2 second)  
    • Constructor Detail

      • Pair

        public Pair​(T1 first,
                    T2 second)
    • Method Detail

      • of

        public static <T1,​T2> Pair<T1,​T2> of​(T1 first,
                                                         T2 second)
      • getFirst

        public T1 getFirst()
        Returns:
        the first member of the Pair<T1, T2>.
      • getSecond

        public T2 getSecond()
        Returns:
        the second member fo the Pair<T1, T2>