Class Pair<P,​Q>

  • Type Parameters:
    P - the type of the first element
    Q - the type of the second element
    Direct Known Subclasses:
    PairOfDoubleOrDArr

    public class Pair<P,​Q>
    extends Object
    A generic class representing a pair of two related objects.
    • Constructor Detail

      • Pair

        public Pair​(P first,
                    Q second)
        Constructs a new Pair with the specified elements.
        Parameters:
        first - the first element of the pair
        second - the second element of the pair
    • Method Detail

      • getFirst

        public P getFirst()
        Gets the first element of the pair.
        Returns:
        the first element
      • getSecond

        public Q getSecond()
        Gets the second element of the pair.
        Returns:
        the second element