Class Pair<L,​R>

  • Type Parameters:
    L - left item type
    R - right item type

    public class Pair<L,​R>
    extends java.lang.Object
    A generic pair of data items. The pair is composed of a "left" data item and a "right" data item.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      L left
      Left data item.
      R right
      Right data item.
    • Constructor Summary

      Constructors 
      Constructor Description
      Pair​(L left, R right)
      Create a new pair.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object otherObj)  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • left

        public L left
        Left data item.
      • right

        public R right
        Right data item.
    • Constructor Detail

      • Pair

        public Pair​(L left,
                    R right)
        Create a new pair.
        Parameters:
        left - left data item
        right - right data item
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object otherObj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

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