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