Class Infinite

  • All Implemented Interfaces:
    Comparable

    public class Infinite
    extends Object
    implements Comparable
    This class represents an Infinite value that may be used as a bucket size specifier. This is immutable.
    Author:
    Ulf Lilleengen
    • Constructor Detail

      • Infinite

        public Infinite​(boolean negative)
        Create an Infinite object with positive or negative sign.
        Parameters:
        negative - the signedness.
    • Method Detail

      • toString

        public String toString()
        Override the toString method in order to be re-parseable.
        Overrides:
        toString in class Object
      • compareTo

        public int compareTo​(Object rhs)
        An infinity value is always less than or greater than.
        Specified by:
        compareTo in interface Comparable
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object