Class UnorderedPair<T>

  • Type Parameters:
    T - type of the objects in the pair.

    public class UnorderedPair<T>
    extends SameTypePair<T>
    An immutable pair of objects of the same type, where the order of the pair does not matter.
    • Constructor Detail

      • UnorderedPair

        public UnorderedPair​(T first,
                             T second)
        Construct a new pair.
        Parameters:
        first - first element, can be null.
        second - second element, can be null.
    • Method Detail

      • equals

        public boolean equals​(Object obj)
        Overrides:
        equals in class Pair<T,​T>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Pair<T,​T>