|
Colt 1.0.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.oswego.cs.dl.util.concurrent.SynchronizedVariable | +--edu.oswego.cs.dl.util.concurrent.SynchronizedShort
A class useful for offloading synch for short instance variables.
[ Introduction to this package. ]
Constructor Summary | |
SynchronizedShort(short initialValue)
Make a new SynchronizedShort with the given initial value, and using its own internal lock. |
|
SynchronizedShort(short initialValue,
Object lock)
Make a new SynchronizedShort with the given initial value, and using the supplied lock. |
Method Summary | |
short |
add(short amount)
Add amount to value (i.e., set value += amount) |
short |
and(short b)
Set value to value & b. |
boolean |
commit(short assumedValue,
short newValue)
Set value to newValue only if it is currently assumedValue. |
int |
compareTo(Object other)
|
int |
compareTo(short other)
|
int |
compareTo(SynchronizedShort other)
|
short |
complement()
Set the value to its complement |
short |
decrement()
Decrement the value. |
short |
divide(short factor)
Divide value by factor (i.e., set value /= factor) |
boolean |
equals(Object other)
|
short |
get()
Return the current value |
int |
hashCode()
|
short |
increment()
Increment the value. |
short |
multiply(short factor)
Multiply value by factor (i.e., set value *= factor) |
short |
negate()
Set the value to the negative of its old value |
short |
or(short b)
Set value to value | b. |
short |
set(short newValue)
Set to newValue. |
short |
subtract(short amount)
Subtract amount from value (i.e., set value -= amount) |
short |
swap(SynchronizedShort other)
Atomically swap values with another SynchronizedShort. |
String |
toString()
|
short |
xor(short b)
Set value to value ^ b. |
Methods inherited from class edu.oswego.cs.dl.util.concurrent.SynchronizedVariable |
execute, getLock |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SynchronizedShort(short initialValue)
public SynchronizedShort(short initialValue, Object lock)
Method Detail |
public short add(short amount)
public short and(short b)
public boolean commit(short assumedValue, short newValue)
public int compareTo(SynchronizedShort other)
public int compareTo(Object other)
compareTo
in interface Comparable
public int compareTo(short other)
public short complement()
public short decrement()
public short divide(short factor)
public boolean equals(Object other)
equals
in class Object
public final short get()
public int hashCode()
hashCode
in class Object
public short increment()
public short multiply(short factor)
public short negate()
public short or(short b)
public short set(short newValue)
public short subtract(short amount)
public short swap(SynchronizedShort other)
public String toString()
toString
in class Object
public short xor(short b)
|
Colt 1.0.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |