|
|||||||||
| 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.UnsignedShort
UnsignedShort Represents an unsigned short value (0-65535), which takes up 16 bits of storage. This cannot take on a negative value.
| Field Summary | |
(package private) static int |
MAX_UNSIGNED_SHORT_VALUE
|
static int |
SHORT_LENGTH
|
| Constructor Summary | |
UnsignedShort()
Contructs a new UnsignedShort object and intializes its value to 0. |
|
UnsignedShort(byte pData)
Constructs an UnsignedShort object from a signed byte,
throws an exception if the paraneter is out of range. |
|
UnsignedShort(int pData)
Constructs an UnsignedShort object from a short,
throws an exception if the parameter is out of range. |
|
UnsignedShort(short pData)
Constructs an UnsignedShort object from a short,
throws an exception if the parameter is out of range. |
|
UnsignedShort(java.lang.String pData)
Constructor, takes string value |
|
| Method Summary | |
void |
add(int pValue)
Add the given amount to the data |
java.lang.Object |
clone()
create a copy of the object that shares no data members with the original. |
int |
compareTo(java.lang.Object obj)
Used for sorting, like strcmp. |
void |
decrement()
subtract one from the value |
double |
doubleValue()
Returns the current value of this object as a double float, 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()
size of this instance when serialized to binary format |
int |
hashCode()
Hashcode. |
void |
increment()
add one to the value |
void |
initializeWithBinary(byte[] pBinaryData,
int offset)
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. |
java.lang.String |
stringValue()
return string representation of this value. |
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 |
static final int MAX_UNSIGNED_SHORT_VALUE
public static final int SHORT_LENGTH
| Constructor Detail |
public UnsignedShort(java.lang.String pData)
public UnsignedShort()
UnsignedShort object and intializes its value to 0.public UnsignedShort(byte pData)
UnsignedShort object from a signed byte,
throws an exception if the paraneter is out of range.pData - >=0java.lang.RuntimeException - if pData is out of rangepublic UnsignedShort(short pData)
UnsignedShort object from a short,
throws an exception if the parameter is out of range.pData - >=0, <=MAX_UNSIGNED_SHORT_VALUEjava.lang.RuntimeException - if the parameter is out of rangepublic UnsignedShort(int pData)
UnsignedShort object from a short,
throws an exception if the parameter is out of range.pData - >=0, <=MAX_UNSIGNED_SHORT_VALUEjava.lang.RuntimeException - if the parameter is out of range| Method Detail |
public int getSize()
getSize in interface Primitivepublic java.lang.String stringValue()
public void initializeWithBinary(byte[] pBinaryData,
int offset)
initializeWithBinary in interface Primitivepublic void initializeWithString(java.lang.String pStringData)
initializeWithString in interface Primitivepublic double doubleValue()
doubleValue in class PrimitiveNumberpublic float floatValue()
floatValue in class PrimitiveNumberpublic int intValue()
intValue in class PrimitiveNumberpublic long longValue()
longValue in class PrimitiveNumberpublic java.lang.String toString()
UnsignedShort value.toString in interface PrimitivetoString in class java.lang.Objectpublic void serialize(java.io.DataOutputStream pOutputStream)
serialize in interface Primitivepublic int compareTo(java.lang.Object obj)
compareTo in interface Primitivepublic int hashCode()
hashCode in interface PrimitivehashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in interface Primitiveequals in class PrimitiveNumberpublic java.lang.Object clone()
clone in interface Primitiveclone in class PrimitiveNumberpublic void increment()
increment in interface ArithmeticIFincrement in class PrimitiveNumberpublic void decrement()
decrement in interface ArithmeticIFdecrement in class PrimitiveNumberpublic void add(int pValue)
add in interface ArithmeticIFadd in class PrimitiveNumberpublic void subtract(int pValue)
subtract in interface ArithmeticIFsubtract in class PrimitiveNumber
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||