Class Pair<T,​U>


  • public class Pair<T,​U>
    extends java.lang.Object
    Stores a pair of values.
    • Constructor Summary

      Constructors 
      Constructor Description
      Pair​(T first, U second)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getFirst()
      Returns the first value.
      U getSecond()
      Returns the second value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Pair

        public Pair​(T first,
                    U second)
        Creates a new instance.
        Parameters:
        first - the first value
        second - the second value
    • Method Detail

      • getFirst

        public T getFirst()
        Returns the first value.
        Returns:
        the first value
      • getSecond

        public U getSecond()
        Returns the second value.
        Returns:
        the second value