|
JScience v3.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavolution.context.RealtimeObject
org.jscience.mathematics.numbers.Number<T>
public abstract class Number<T extends Number<T>>
This class represents an immutable number.
Instances of this class are typically created using real-time
factories.
| 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 |
| Constructor Summary | |
|---|---|
Number()
|
|
| Method Summary | |
|---|---|
byte |
byteValue()
Returns the value of this number as a byte. |
abstract int |
compareTo(T that)
Compares this number with the specified number for order. |
abstract double |
doubleValue()
Returns the value of this number as a double. |
abstract boolean |
equals(java.lang.Object obj)
Indicates if this number is equals to the specified object. |
float |
floatValue()
Returns the value of this number as a float. |
abstract int |
hashCode()
Returns the hash code for this number (consistent with equals(Object). |
int |
intValue()
Returns the value of this number as an int. |
boolean |
isGreaterThan(T that)
Indicates if this number is ordered after that number (convenience method). |
abstract boolean |
isLargerThan(T that)
Compares the magnitude of this number with that number. |
boolean |
isLessThan(T that)
Indicates if this number is ordered before that number (convenience method). |
abstract long |
longValue()
Returns the value of this number as a long. |
T |
minus(T that)
Returns the difference between this number and the one specified. |
boolean |
move(Realtime.ObjectSpace os)
Moves this real-time object to the specified object space. |
T |
pow(int exp)
Returns this number raised at the specified positive exponent. |
short |
shortValue()
Returns the value of this number as a short. |
abstract Text |
toText()
Returns the textual representation of this real-time object (equivalent to toString except that the returned value
can be allocated from the local context space). |
| 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 |
| Methods inherited from interface org.jscience.mathematics.structures.Ring |
|---|
times |
| Methods inherited from interface org.jscience.mathematics.structures.GroupAdditive |
|---|
opposite, plus |
| Constructor Detail |
|---|
public Number()
| Method Detail |
|---|
public abstract boolean isLargerThan(T that)
|this| > |that|public abstract long longValue()
long.
long.public abstract double doubleValue()
double.
double.public abstract int compareTo(T that)
(x.compareTo(y)==0) == (x.equals(y)),
compareTo in interface java.lang.Comparable<T extends Number<T>>that - the number to be compared.
public final boolean isLessThan(T that)
that - the number to compare with.
this.compareTo(that) < 0.public final boolean isGreaterThan(T that)
that - the number to compare with.
this.compareTo(that) > 0.public T minus(T that)
that - the number to be subtracted.
this - that.public T pow(int exp)
exp - the positive exponent.
thisexp
java.lang.IllegalArgumentException - if exp <= 0public final byte byteValue()
byte.
This may involve rounding or truncation.
byte.public final short shortValue()
short.
This may involve rounding or truncation.
short.public final int intValue()
int.
This may involve rounding or truncation.
int.public final float floatValue()
float.
This may involve rounding.
float.public abstract boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to be compared with.
true if this number and the specified argument
represent the same number; false otherwise.public abstract int hashCode()
equals(Object).
hashCode in class java.lang.Objectpublic abstract Text toText()
toString except that the returned value
can be allocated from the local context space).
toText in interface RealtimetoText in class RealtimeObjectpublic boolean move(Realtime.ObjectSpace os)
move in interface Realtimemove in class RealtimeObjectos - the object space to move this real-time object to.
true if the move has to be propagated to
external real-time references; false otherwise.
|
JScience v3.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||