Documentation of 'jsci.maths.MathInteger' Java class
MathInteger
jsci.maths

Class MathInteger

    • Constructor Detail

      • MathInteger

        public MathInteger(int num)
        Constructs an integer number.
      • MathInteger

        public MathInteger(java.lang.String s)
                    throws java.lang.NumberFormatException
        Constructs the integer number represented by a string.
        Parameters:
        s - a string representing an integer number.
        Throws:
        java.lang.NumberFormatException - if the string does not contain a parsable number.
    • Method Detail

      • equals

        public boolean equals(java.lang.Object obj)
        Compares two integer numbers for equality.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - an integer number.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo(java.lang.Object obj)
                      throws java.lang.IllegalArgumentException
        Compares two integer numbers.
        Specified by:
        compareTo in interface java.lang.Comparable
        Parameters:
        obj - an integer number.
        Returns:
        a negative value if this<obj, zero if this==obj, and a positive value if this>obj.
        Throws:
        java.lang.IllegalArgumentException
      • toString

        public java.lang.String toString()
        Returns a string representing the value of this integer number.
        Overrides:
        toString in class java.lang.Object
      • value

        public int value()
        Returns the integer value.
      • intValue

        public int intValue()
        Specified by:
        intValue in class java.lang.Number
      • longValue

        public long longValue()
        Specified by:
        longValue in class java.lang.Number
      • floatValue

        public float floatValue()
        Specified by:
        floatValue in class java.lang.Number
      • doubleValue

        public double doubleValue()
        Specified by:
        doubleValue in class java.lang.Number
      • isEven

        public boolean isEven()
        Returns true if this number is even.
      • isOdd

        public boolean isOdd()
        Returns true if this number is odd.
      • getSet

        public java.lang.Object getSet()
        Specified by:
        getSet in interface Member
      • subtract

        public MathInteger subtract(MathInteger n)
        Returns the subtraction of this integer number and another.
        Parameters:
        n - an integer number.
      • multiply

        public MathInteger multiply(MathInteger n)
        Returns the multiplication of this integer number and another.
        Parameters:
        n - an integer number.
      • pow

        public MathInteger pow(MathInteger n)
        Returns this integer number raised to the power of another.
        Parameters:
        n - an integer number.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.