Class Pair<A,​B>

  • Type Parameters:
    A - first object in pair
    B - second object in pair

    public class Pair<A,​B>
    extends Object
    Custom pair class similar to C++. By default we compare based on the first value
    Author:
    markr
    • Field Detail

      • first

        protected final A first
        The first object in this Pair
      • second

        protected final B second
        The second object in this Pair
    • Constructor Detail

      • Pair

        public Pair​(A first,
                    B second)
        Constructor
        Parameters:
        first - first object in pair
        second - second object in pair