Class IntValue

    • Field Detail

      • value

        protected final int value
        the int value
    • Constructor Detail

      • IntValue

        public IntValue​(int value)
        Constructor.
        Parameters:
        value - the int value
    • Method Detail

      • compareTo

        public final int compareTo​(IntValue that)
        Specified by:
        compareTo in interface Comparable<IntValue>
        Parameters:
        that - The object to compare with
        Returns:
        0 if equal, -1 if less than or 1 if greater than
      • equals

        public final boolean equals​(Object that)
        Compares this Object to a given Object.
        Overrides:
        equals in class Object
        Parameters:
        that - the Object to compare with
        Returns:
        0 if equal, -1 if less than the given Object's value, or 1 if greater than given Object's value
      • greaterThan

        public final boolean greaterThan​(int value)
        Compares this IntValue with a primitive int value.
        Parameters:
        value - the int value to compare with
        Returns:
        true if this IntValue is greater than the given int value
      • greaterThan

        public final boolean greaterThan​(IntValue that)
        Compares this IntValue with another IntValue.
        Parameters:
        that - the IntValue to compare with
        Returns:
        true if this IntValue is greater than the given IntValue
      • hashCode

        public final int hashCode()
        Returns the hash code for this Object.
        Overrides:
        hashCode in class Object
        Returns:
        hash code for this Object
      • lessThan

        public final boolean lessThan​(int that)
        Compares this IntValue with a primitive int value.
        Parameters:
        that - the int value to compare with
        Returns:
        true if this IntValue is less than the given int value
      • lessThan

        public final boolean lessThan​(IntValue that)
        Compares this IntValue with another IntValue.
        Parameters:
        that - the IntValue to compare with
        Returns:
        true if this IntValue is less than the given IntValue
      • toString

        public String toString()
        Converts this LongValue to a String.
        Overrides:
        toString in class Object
        Returns:
        a String representation of this LongValue