|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Number
org.jboss.util.MuNumber (src)
org.jboss.util.MuByte
A mutable byte class.
Constructor Summary | |
MuByte()
Construct a new mutable byte. |
|
MuByte(byte b)
Construct a new mutable byte. |
|
MuByte(java.lang.Object obj)
Construct a new mutable byte. |
Method Summary | |
byte |
add(byte amount)
Add the specified amount. |
byte |
and(byte b)
ANDs the current value with the specified value. |
byte |
byteValue()
Return the byte value of this object. |
java.lang.Object |
clone()
Return a cloned copy of this mutable byte. |
boolean |
commit(byte assumed,
byte b)
Set the value to value only if the current value is equal to the assumed value. |
int |
compareTo(byte other)
Compares this object with the specified byte for order. |
int |
compareTo(java.lang.Object obj)
Compares this object with the specified object for order. |
byte |
complement()
Set the value to its complement. |
byte |
decrement()
Decrement the value of this mutable byte. |
byte |
divide(byte factor)
Divide by the specified factor. |
double |
doubleValue()
Return the double value of this object. |
boolean |
equals(java.lang.Object obj)
Test the equality of this mutable byte and another object. |
float |
floatValue()
Return the float value of this object. |
byte |
get()
Get the value. |
java.lang.Object |
getValue()
Get the byte value of this mutable byte. |
int |
hashCode()
Get the hash code for this mutable byte. |
byte |
increment()
Increment the value of this mutable byte. |
int |
intValue()
Return the int value of this object. |
long |
longValue()
Return the long value of this object. |
byte |
multiply(byte factor)
Multiply by the specified factor. |
byte |
negate()
Set the value to the negative of its current value. |
byte |
or(byte b)
ORs the current value with the specified value. |
byte |
set(byte b)
Set the value. |
void |
setValue(java.lang.Object obj)
Set the value of this mutable byte. |
byte |
shiftLeft(int bits)
Shift the current value to the left. |
byte |
shiftRight(int bits)
Shift the current value to the right. |
byte |
shiftRightZero(int bits)
Shift the current value to the right with a zero extension. |
short |
shortValue()
Return the short value of this object. |
byte |
subtract(byte amount)
Subtract the specified amount. |
byte |
swap(MuByte (src) b)
Swap values with another mutable byte. |
java.lang.String |
toString()
Convert this mutable byte to a string. |
byte |
xor(byte b)
XORs the current value with the specified value. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MuByte()
public MuByte(byte b)
b
- Byte value.public MuByte(java.lang.Object obj)
obj
- Object to convert to a byte value.Method Detail |
public byte set(byte b)
b
- Byte value.
public byte get()
public boolean commit(byte assumed, byte b)
assumed
- The assumed value.b
- The new value.
public byte swap(MuByte (src) b)
b
- Mutable byte to swap values with.
public byte increment()
public byte decrement()
public byte add(byte amount)
amount
- Amount to add.
public byte subtract(byte amount)
amount
- Amount to subtract.
public byte multiply(byte factor)
factor
- Factor to multiply by.
public byte divide(byte factor)
factor
- Factor to divide by.
public byte negate()
public byte complement()
public byte and(byte b)
b
- Value to and with.
public byte or(byte b)
b
- Value to or with.
public byte xor(byte b)
b
- Value to xor with.
public byte shiftRight(int bits)
bits
- The number of bits to shift.
public byte shiftRightZero(int bits)
bits
- The number of bits to shift.
public byte shiftLeft(int bits)
bits
- The number of bits to shift.
public int compareTo(byte other)
other
- Value to compare with.
public int compareTo(java.lang.Object obj) throws java.lang.ClassCastException
java.lang.ClassCastException
- Object is not a MuByte.public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object obj)
obj
- Object to test equality with.
public java.lang.Object clone()
public byte byteValue()
byte
value of this object.
byteValue
in class MuNumber (src)
byte
value.public short shortValue()
short
value of this object.
shortValue
in class MuNumber (src)
short
value.public int intValue()
int
value of this object.
intValue
in class MuNumber (src)
int
value.public long longValue()
long
value of this object.
long
value.public float floatValue()
float
value of this object.
floatValue
in class MuNumber (src)
float
value.public double doubleValue()
double
value of this object.
double
value.public void setValue(java.lang.Object obj)
obj
- Object to convert to a byte
value.public java.lang.Object getValue()
java.lang.Byte
value.
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |