|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.web3d.vrtp.datatypes.PrimitiveNumber | +--org.web3d.vrtp.datatypes.LongInteger
LongInteger, not to be confused with java.lang.Long. This contains some extra methods.
This is a 64-bit integer, eight bytes long.
Field Summary | |
static int |
LONG_SIZE
|
Constructor Summary | |
LongInteger()
Contructs a new LongInteger object and intializes its value to 0. |
|
LongInteger(byte pData)
Constructs an LongInteger object from a signed byte, |
|
LongInteger(int pData)
Constructs a new LongInteger from a primitive integer |
|
LongInteger(long pData)
Constructs a new LongInteger from a primitive long |
|
LongInteger(short pData)
Constructs an LongInteger object from a short, |
|
LongInteger(java.lang.String pData)
Constructor, takes string represenation of the long integer as input. |
Method Summary | |
void |
add(int pValue)
Add the given amount to the data |
java.lang.Object |
clone()
return a deep-copy new instance of this object. |
int |
compareTo(java.lang.Object obj)
Implementation of the Comparable interface. |
void |
decrement()
subtract one from the value |
double |
doubleValue()
Returns the current value of this object as a java primitive double, after conversion. |
boolean |
equals(java.lang.Object obj)
Compare for equality. |
float |
floatValue()
Returns a the current value of this object as a float, after conversion. |
int |
getSize()
Returns the size, in bytes, of this piece of data, when serialized in binary format |
int |
hashCode()
Returns a hashcode for the object. |
void |
increment()
add one to the value |
void |
initializeWithBinary(byte[] pBinaryData,
int pOffset)
Initialize an already-existing object with binary data. |
void |
initializeWithString(java.lang.String pStringData)
Initialize the object with the string data given. |
int |
intValue()
Returns the current value of this object as an int, after conversion. |
long |
longValue()
Returns the current value of this object as a long, after conversion. |
void |
serialize(java.io.DataOutputStream pOutputStream)
Yeech. |
void |
subtract(int pValue)
subtract the given amount from the value |
java.lang.String |
toString()
Returns a String object representing this UnsignedShort value. |
Methods inherited from class org.web3d.vrtp.datatypes.PrimitiveNumber |
byteValue, shortValue |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int LONG_SIZE
Constructor Detail |
public LongInteger(java.lang.String pData)
pData
- string representation of long integerpublic LongInteger()
LongInteger
object and intializes its value to 0.public LongInteger(byte pData)
LongInteger
object from a signed byte,pData
- java byte primitive typepublic LongInteger(short pData)
LongInteger
object from a short,public LongInteger(int pData)
public LongInteger(long pData)
Method Detail |
public int getSize()
public void initializeWithBinary(byte[] pBinaryData, int pOffset)
pBinaryData
- array containing binary value of this objectpOffset
- point in the data that this object's value startspublic void initializeWithString(java.lang.String pStringData)
pStringData
- string representation of the long integerpublic double doubleValue()
doubleValue
in class PrimitiveNumber
public float floatValue()
floatValue
in class PrimitiveNumber
public int intValue()
intValue
in class PrimitiveNumber
public long longValue()
longValue
in class PrimitiveNumber
public java.lang.String toString()
UnsignedShort
value.
This has massive problems with truncation.toString
in class java.lang.Object
public void serialize(java.io.DataOutputStream pOutputStream)
public java.lang.Object clone()
clone
in class PrimitiveNumber
public int compareTo(java.lang.Object obj)
public boolean equals(java.lang.Object obj)
equals
in class PrimitiveNumber
public int hashCode()
hashCode
in class java.lang.Object
public void increment()
increment
in interface ArithmeticIF
increment
in class PrimitiveNumber
public void decrement()
decrement
in interface ArithmeticIF
decrement
in class PrimitiveNumber
public void add(int pValue)
add
in interface ArithmeticIF
add
in class PrimitiveNumber
public void subtract(int pValue)
subtract
in interface ArithmeticIF
subtract
in class PrimitiveNumber
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |