Class Pair<T1,​T2>

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

    public class Pair<T1,​T2>
    extends Object
    A simple pair/tuple class.
    • Constructor Detail

      • Pair

        public Pair()
        Defaut constructor.
      • Pair

        public Pair​(T1 first,
                    T2 second)
        Constructs with both values.
        Parameters:
        first - The first value.
        second - The second value.
    • Method Detail

      • getFirst

        public T1 getFirst()
        Gets the first value of the pair.
        Returns:
        The first value of the pair.
      • setFirst

        public void setFirst​(T1 value)
        Sets the first value of the pair.
        Parameters:
        value - The first value of the pair.
      • getSecond

        public T2 getSecond()
        Gets the second value of the pair.
        Returns:
        The second value of the pair.
      • setSecond

        public void setSecond​(T2 value)
        Sets the second value.
        Parameters:
        value - The second value of the pair.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object