Class NegativeInfinity

  • All Implemented Interfaces:
    Num

    public final class NegativeInfinity
    extends java.lang.Object
    implements Num
    • Constructor Detail

      • NegativeInfinity

        private NegativeInfinity()
      • NegativeInfinity

        public NegativeInfinity​(int num)
      • NegativeInfinity

        public NegativeInfinity​(double value)
      • NegativeInfinity

        public NegativeInfinity​(int num,
                                int den)
    • Method Detail

      • doubleValue

        public double doubleValue()
        Specified by:
        doubleValue in interface Num
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface Num
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface Num
        Overrides:
        toString in class java.lang.Object
      • copy

        public Num copy()
        Specified by:
        copy in interface Num
      • getNaN

        public Num getNaN()
        Specified by:
        getNaN in interface Num
      • createNaN

        public Num createNaN()
        Specified by:
        createNaN in interface Num
      • getZero

        public Num getZero()
        Specified by:
        getZero in interface Num
      • createZero

        public Num createZero()
        Specified by:
        createZero in interface Num
      • create

        public Num create​(double value)
        Specified by:
        create in interface Num
      • create

        public Num create​(int num)
        Specified by:
        create in interface Num
      • create

        public Num create​(int num,
                          int den)
        Specified by:
        create in interface Num
      • create

        public Num create​(java.lang.String num_str)
                   throws java.lang.Exception
        Specified by:
        create in interface Num
        Throws:
        java.lang.Exception
      • gtZero

        public boolean gtZero()
        Specified by:
        gtZero in interface Num
      • geqZero

        public boolean geqZero()
        Specified by:
        geqZero in interface Num
      • eqZero

        public boolean eqZero()
        Specified by:
        eqZero in interface Num
      • leqZero

        public boolean leqZero()
        Specified by:
        leqZero in interface Num
      • ltZero

        public boolean ltZero()
        Specified by:
        ltZero in interface Num
      • gt

        public boolean gt​(Num num)
        Specified by:
        gt in interface Num
      • geq

        public boolean geq​(Num num)
        Specified by:
        geq in interface Num
      • eq

        public boolean eq​(Num num)
        Specified by:
        eq in interface Num
      • eq

        public boolean eq​(double num)
        Specified by:
        eq in interface Num
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface Num
        Overrides:
        equals in class java.lang.Object
      • leq

        public boolean leq​(Num num)
        Specified by:
        leq in interface Num
      • lt

        public boolean lt​(Num num)
        Specified by:
        lt in interface Num
      • isFinite

        public boolean isFinite()
        Specified by:
        isFinite in interface Num
      • isInfinite

        public boolean isInfinite()
        Specified by:
        isInfinite in interface Num
      • isNaN

        public boolean isNaN()
        Specified by:
        isNaN in interface Num
      • add

        public Num add​(Num num1,
                       Num num2)
        Specified by:
        add in interface Num
      • sub

        public Num sub​(Num num1,
                       Num num2)
        Specified by:
        sub in interface Num
      • mult

        public Num mult​(Num num1,
                        Num num2)
        Specified by:
        mult in interface Num
      • div

        public Num div​(Num num1,
                       Num num2)
        Specified by:
        div in interface Num
      • abs

        public Num abs​(Num num)
        Specified by:
        abs in interface Num
      • diff

        public Num diff​(Num num1,
                        Num num2)
        Specified by:
        diff in interface Num
      • max

        public Num max​(Num num1,
                       Num num2)
        Specified by:
        max in interface Num
      • min

        public Num min​(Num num1,
                       Num num2)
        Specified by:
        min in interface Num
      • negate

        public Num negate​(Num num)
        Specified by:
        negate in interface Num