JScience v3.3

org.jscience.mathematics.numbers
Class Integer64

java.lang.Object
  extended by javolution.context.RealtimeObject
      extended by org.jscience.mathematics.numbers.Number<Integer64>
          extended by org.jscience.mathematics.numbers.Integer64
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Integer64>, Realtime, Immutable, GroupAdditive<Integer64>, Ring<Integer64>, Structure<Integer64>

public final class Integer64
extends Number<Integer64>

This class represents a 64 bits integer number.

Version:
3.0, February 13, 2006
Author:
Jean-Marie Dautelle
See Also:
Wikipedia: Integer, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javolution.context.RealtimeObject
RealtimeObject.Factory<T extends RealtimeObject>
 
Nested classes/interfaces inherited from interface javolution.context.Realtime
Realtime.ObjectSpace
 
Field Summary
static Integer64 ONE
          The 64 bits floating point representing one.
protected static XMLFormat<Integer64> XML
          Holds the default XML representation for 64 bits integer numbers.
static Integer64 ZERO
          The 64 bits floating point representing zero.
 
Method Summary
 Integer64 abs()
          Returns the absolute value of this number.
 int compareTo(Integer64 that)
          Compares this number with the specified number for order.
 Integer64 divide(Integer64 that)
          Returns this number divided by the one specified.
 double doubleValue()
          Returns the value of this number as a double.
 boolean equals(java.lang.Object that)
          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 longValue()
          Returns the value of this number as a long.
 Integer64 minus(Integer64 that)
          Returns the difference between this number and the one specified.
 Integer64 opposite()
          Returns the opposite of this number.
 Integer64 plus(Integer64 that)
          Returns the sum of this number with the one specified.
 Integer64 times(Integer64 that)
          Returns the product of this number with the one specified.
 Text toText()
          Returns the decimal text representation of this number.
static Integer64 valueOf(java.lang.CharSequence chars)
          Returns the number for the specified character sequence.
static Integer64 valueOf(long longValue)
          Returns the 64 bits integer from the specified long value.
 
Methods inherited from class org.jscience.mathematics.numbers.Number
byteValue, floatValue, intValue, isGreaterThan, isLessThan, move, pow, shortValue
 
Methods inherited from class javolution.context.RealtimeObject
export, isLocal, moveHeap, preserve, toString, unpreserve
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

XML

protected static final XMLFormat<Integer64> XML
Holds the default XML representation for 64 bits integer numbers. This representation consists of a simple value attribute holding the textual representation.


ZERO

public static final Integer64 ZERO
The 64 bits floating point representing zero.


ONE

public static final Integer64 ONE
The 64 bits floating point representing one.

Method Detail

valueOf

public static Integer64 valueOf(long longValue)
Returns the 64 bits integer from the specified long value.

Parameters:
longValue - the long value for this number.
Returns:
the corresponding number.
See Also:
longValue()

valueOf

public static Integer64 valueOf(java.lang.CharSequence chars)
Returns the number for the specified character sequence.

Parameters:
chars - the character sequence.
Returns:
the corresponding number.

opposite

public Integer64 opposite()
Returns the opposite of this number.

Returns:
-this.

plus

public Integer64 plus(Integer64 that)
Returns the sum of this number with the one specified.

Parameters:
that - the number to be added.
Returns:
this + that.

minus

public Integer64 minus(Integer64 that)
Returns the difference between this number and the one specified.

Overrides:
minus in class Number<Integer64>
Parameters:
that - the number to be subtracted.
Returns:
this - that.

times

public Integer64 times(Integer64 that)
Returns the product of this number with the one specified.

Parameters:
that - the number multiplier.
Returns:
this ยท that.

divide

public Integer64 divide(Integer64 that)
Returns this number divided by the one specified.

Parameters:
that - the number divisor.
Returns:
this / that.

isLargerThan

public boolean isLargerThan(Integer64 that)
Compares the magnitude of this number with that number.

Specified by:
isLargerThan in class Number<Integer64>
Returns:
|this| > |that|

abs

public Integer64 abs()
Returns the absolute value of this number.

Returns:
|this|.

toText

public Text toText()
Returns the decimal text representation of this number.

Specified by:
toText in interface Realtime
Specified by:
toText in class Number<Integer64>
Returns:
the text representation of this number.

equals

public boolean equals(java.lang.Object that)
Compares this number against the specified object.

Specified by:
equals in class Number<Integer64>
Parameters:
that - the object to compare with.
Returns:
true if the objects are the same; false otherwise.

hashCode

public int hashCode()
Returns the hash code for this number.

Specified by:
hashCode in class Number<Integer64>
Returns:
the hash code value.

longValue

public long longValue()
Description copied from class: Number
Returns the value of this number as a long.

Specified by:
longValue in class Number<Integer64>
Returns:
the numeric value represented by this object after conversion to type long.

doubleValue

public double doubleValue()
Description copied from class: Number
Returns the value of this number as a double.

Specified by:
doubleValue in class Number<Integer64>
Returns:
the numeric value represented by this object after conversion to type double.

compareTo

public int compareTo(Integer64 that)
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)),

Specified by:
compareTo in interface java.lang.Comparable<Integer64>
Specified by:
compareTo in class Number<Integer64>
Parameters:
that - the number to be compared.
Returns:
a negative integer, zero, or a positive integer as this number is less than, equal to, or greater than the specified number.

JScience v3.3

Copyright © 2006 JScience.