Class Pair<X,​Y>

  • All Implemented Interfaces:

    public class Pair<X,​Y>
    extends java.lang.Object
    A pair of keys. It is used with DualHashSet and DualHashMap to represent a pair of keys as an object.
    See Also:
    Serialized Form
    • Field Summary

      Modifier and Type Field Description
      X x
      The first key.
      Y y
      The second key.
    • Constructor Summary

      Modifier Constructor Description
      protected Pair()  
        Pair​(X x, Y y)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      X getX()
      Returns the first value of the pair.
      Y getY()
      Returns the second value of the pair.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • x

        public final X x
        The first key.
      • y

        public final Y y
        The second key.
    • Constructor Detail

      • Pair

        public Pair​(X x,
                    Y y)
      • Pair

        protected Pair()
    • Method Detail

      • getX

        public X getX()
        Returns the first value of the pair.
      • getY

        public Y getY()
        Returns the second value of the pair.
      • equals

        public final boolean equals​(java.lang.Object o)
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object