Package org.jscience.mathematics.number
Class Integer64
- All Implemented Interfaces:
Serializable
,Comparable<Integer64>
,javolution.lang.Immutable
,javolution.lang.Realtime
,javolution.lang.ValueType
,javolution.xml.XMLSerializable
,GroupAdditive<Integer64>
,Ring<Integer64>
,Structure<Integer64>
This class represents a 64 bits integer number.
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionabs()
Returns the absolute value of this number.int
compareTo
(long value) Compares this number with the specified value for order.int
Compares this number with the specified number for order.copy()
Returns a copy of this numberallocated
by the calling thread (possibly on the stack).divide
(long value) Returns this number divided by the specified value.Returns this number divided by the one specified.double
Returns the value of this number as adouble
.boolean
equals
(long value) Compares this number against the specified value.boolean
Compares this number against the specified object.int
hashCode()
Returns the hash code for this number.boolean
isLargerThan
(Integer64 that) Compares the magnitude of this number with that number.long
Returns the value of this number as along
.minus
(long value) Returns the difference between this number and the specified valueReturns the difference between this number and the one specified.opposite()
Returns the opposite of this number.plus
(long value) Returns the sum of this number with the specifice value.Returns the sum of this number with the one specified.times
(long value) Returns the product of this number with the specified value.Returns the product of this number with the one specified.javolution.text.Text
toText()
Returns the decimal text representation of this number.static Integer64
valueOf
(long longValue) Returns the 64 bits integer from the specifiedlong
value.static Integer64
valueOf
(CharSequence chars) Returns the number for the specified character sequence.Methods inherited from class org.jscience.mathematics.number.Number
byteValue, floatValue, intValue, isGreaterThan, isLessThan, pow, shortValue, toString
-
Field Details
-
ZERO
The 64 bits floating point representing zero. -
ONE
The 64 bits floating point representing one.
-
-
Method Details
-
valueOf
Returns the 64 bits integer from the specifiedlong
value.- Parameters:
longValue
- thelong
value for this number.- Returns:
- the corresponding number.
- See Also:
-
valueOf
Returns the number for the specified character sequence.- Parameters:
chars
- the character sequence.- Returns:
- the corresponding number.
-
opposite
Returns the opposite of this number.- Returns:
-this
.
-
plus
Returns the sum of this number with the one specified.- Parameters:
that
- the number to be added.- Returns:
this + that
.
-
plus
Returns the sum of this number with the specifice value.- Parameters:
value
- the value to be added.- Returns:
this + value
.
-
minus
Returns the difference between this number and the one specified. -
minus
Returns the difference between this number and the specified value- Parameters:
value
- the value to be subtracted.- Returns:
this - value
.
-
times
Returns the product of this number with the one specified.- Parameters:
that
- the number multiplier.- Returns:
this · that
.
-
times
Returns the product of this number with the specified value.- Parameters:
value
- the value multiplier.- Returns:
this · value
.
-
divide
Returns this number divided by the one specified.- Parameters:
that
- the number divisor.- Returns:
this / that
.
-
divide
Returns this number divided by the specified value.- Parameters:
value
- the value divisor.- Returns:
this / value
.
-
isLargerThan
Compares the magnitude of this number with that number.- Specified by:
isLargerThan
in classNumber<Integer64>
- Returns:
|this| > |that|
-
abs
Returns the absolute value of this number.- Returns:
|this|
.
-
toText
public javolution.text.Text toText()Returns the decimal text representation of this number. -
equals
Compares this number against the specified object. -
equals
public boolean equals(long value) Compares this number against the specified value.- Parameters:
value
- the value to compare with.- Returns:
this.longValue() == value
-
compareTo
public int compareTo(long value) Compares this number with the specified value for order.- Parameters:
value
- the value to be compared with.- Returns:
- a negative integer, zero, or a positive integer as this number is less than, equal to, or greater than the specified value.
-
hashCode
public int hashCode()Returns the hash code for this number. -
longValue
public long longValue()Description copied from class:Number
Returns the value of this number as along
. -
doubleValue
public double doubleValue()Description copied from class:Number
Returns the value of this number as adouble
.- Specified by:
doubleValue
in classNumber<Integer64>
- Returns:
- the numeric value represented by this object after conversion
to type
double
.
-
compareTo
Description copied from class:Number
Compares this number with the specified number for order. Returns a negative integer, zero, or a positive integer as this number is less than, equal to, or greater than the specified number. Implementation must ensure that this method is consistent with equals(x.compareTo(y)==0) == (x.equals(y))
, -
copy
Description copied from class:Number
Returns a copy of this numberallocated
by the calling thread (possibly on the stack).
-