|
|||||||||
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.UnsignedByte
UnsignedByte
Field Summary | |
static int |
BYTE_SIZE
|
(package private) static short |
MAX_UNSIGNED_BYTE_VALUE
|
Constructor Summary | |
UnsignedByte()
Contructs a new UnsignedByte object and intializes its value to 0. |
|
UnsignedByte(byte pData)
Constructs an UnsignedByte object from a signed byte,
throws an exception if the paraneter is out of range. |
|
UnsignedByte(int pData)
Constructs an UnsignedByte object from a int,
throws an exception if the parameter is out of range. |
|
UnsignedByte(short pData)
Constructs an UnsignedByte object from a short,
throws an exception if the parameter is out of range. |
|
UnsignedByte(java.lang.String pData)
|
Method Summary | |
void |
add(int pValue)
Add the given amount to the data |
byte |
byteValue()
Returns the value of the specified number as a byte . |
java.lang.Object |
clone()
Return clone of this object, no shared data |
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 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()
Number of bytes this takes up when serialized in binary format. |
int |
hashCode()
Return 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)
This is parallel to Java's serialization scheme. |
short |
shortValue()
Returns the value of the specified number as a short . |
void |
subtract(int pValue)
subtract the given amount from the value |
java.lang.String |
toString()
Returns a String object representing this UnsignedByte value. |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final short MAX_UNSIGNED_BYTE_VALUE
public static final int BYTE_SIZE
Constructor Detail |
public UnsignedByte(java.lang.String pData)
public UnsignedByte()
UnsignedByte
object and intializes its value to 0.public UnsignedByte(byte pData)
UnsignedByte
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 UnsignedByte(short pData)
UnsignedByte
object from a short,
throws an exception if the parameter is out of range.pData
- >=0, <=MAX_UNSIGNED_BYTE_VALUEjava.lang.RuntimeException
- if the parameter is out of rangepublic UnsignedByte(int pData)
UnsignedByte
object from a int,
throws an exception if the parameter is out of range.pData
- >=0, <=MAX_UNSIGNED_BYTE_VALUEjava.lang.RuntimeException
- if the parameter is out of rangeMethod Detail |
public void initializeWithBinary(byte[] pBinaryData, int offset)
public void initializeWithString(java.lang.String pStringData)
public int hashCode()
hashCode
in class java.lang.Object
public int getSize()
Primitive
public byte byteValue()
byte
.
This may involve rounding or truncation.byteValue
in class PrimitiveNumber
byte
.public short shortValue()
short
.
This may involve rounding or truncation.shortValue
in class PrimitiveNumber
short
.public 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()
UnsignedByte
value.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 void increment()
increment
in class PrimitiveNumber
public void decrement()
decrement
in class PrimitiveNumber
public void add(int pValue)
add
in class PrimitiveNumber
public void subtract(int pValue)
subtract
in class PrimitiveNumber
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |