Class Pair<A>

  • Type Parameters:
    A - the type of the paired objects

    public class Pair<A>
    extends Object
    The Pair groups two objects of the same type in a given order.
    • Field Detail

      • first

        protected final A first
      • second

        protected final A second
    • Constructor Detail

      • Pair

        public Pair​(A first,
                    A second)
        Constructs a Pair with a first and a second element.
        Parameters:
        first - the first object
        second - the second object
    • Method Detail

      • getFirst

        public A getFirst()
        Returns the first element.
        Returns:
        the first element
      • getSecond

        public A getSecond()
        Returns the second element.
        Returns:
        the second element