Method Summary |
|
final public boolean | compareAndSet(V expect, V update) Atomically set the value to the given updated value
if the current value == the expected value.
Parameters: expect - the expected value Parameters: update - the new value true if successful. |
final public V | get() Get the current value. |
final public V | getAndSet(V newValue) Set to the given value and return the old value. |
final public void | set(V newValue) Set to the given value. |
public String | toString() Returns the String representation of the current value. |
final public boolean | weakCompareAndSet(V expect, V update) Atomically set the value to the given updated value
if the current value == the expected value. |