Module NewOCR

Class IntPair


  • public final class IntPair
    extends java.lang.Object
    A class that acts as an int-int tuple.
    Since:
    January 12, 2019
    • Constructor Summary

      Constructors 
      Constructor Description
      IntPair​(int key, int value)
      Creates a new IntPair with the specified key and value.
    • Method Summary

      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      int getKey()
      Gets this IntPair's key.
      int getValue()
      Gets this IntPair's value.
      int hashCode()
      void setKey​(int key)
      Sets this IntPair's key.
      void setValue​(int value)
      Sets this IntPair's value.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

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

      • IntPair

        public IntPair​(int key,
                       int value)
        Creates a new IntPair with the specified key and value.
        Parameters:
        key - the key.
        value - the value.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        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
      • getKey

        public int getKey()
        Gets this IntPair's key.
        Returns:
        the key as an int.
      • setKey

        public void setKey​(int key)
        Sets this IntPair's key.
        Parameters:
        key - The key as an int.
      • getValue

        public int getValue()
        Gets this IntPair's value.
        Returns:
        the value as an int.
      • setValue

        public void setValue​(int value)
        Sets this IntPair's value.
        Parameters:
        value - The value as an int.