Class NegativeInfinity

java.lang.Object
org.zfcj.math.numbers.NegativeInfinity
All Implemented Interfaces:
Comparable<RealNumber>, Number, RealNumber

public final class NegativeInfinity extends Object implements RealNumber
Represents an actualized negative infinity, denoted as -∞, a RealNumber less than any other RealNumber
  • Field Details

  • Method Details

    • doubleValue

      public double doubleValue()
      Description copied from interface: RealNumber
      Returns this RealNumber's value with double-precision type. Note that the value will be an approximation for irrational numbers such as Pi, Phi, e or repeating decimals such as 0.666..., 1.851851851..., etc.
      Specified by:
      doubleValue in interface RealNumber
      Returns:
      the double value that is the closest approximation to this real number
    • bigDecimalValue

      public BigDecimal bigDecimalValue()
      Description copied from interface: RealNumber
      Returns this RealNumber's value as a BigDecimal
      Specified by:
      bigDecimalValue in interface RealNumber
      Returns:
      the BigDecimal value
    • isDouble

      public boolean isDouble()
      Description copied from interface: RealNumber
      Determines if this RealNumber's value has the precision of a primitive double
      Specified by:
      isDouble in interface RealNumber
      Returns:
      true if this RealNumber is double precision, false, if BigDecimal precision
    • compareTo

      public int compareTo(RealNumber n)
      Specified by:
      compareTo in interface Comparable<RealNumber>
      Specified by:
      compareTo in interface RealNumber
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object