EDU.oswego.cs.dl.util.concurrent
Class WaitableFloat
public
class
WaitableFloat
extends SynchronizedFloat
Constructor Summary |
| WaitableFloat(float initialValue)
Make a new WaitableFloat with the given initial value,
and using its own internal lock.
|
| WaitableFloat(float initialValue, Object lock)
Make a new WaitableFloat with the given initial value,
and using the supplied lock.
|
Method Summary |
float | add(float amount) |
boolean | commit(float assumedValue, float newValue) |
float | divide(float factor) |
float | multiply(float factor) |
float | set(float newValue) |
float | subtract(float amount) |
void | whenEqual(float c, Runnable action)
Wait until value equals c, then run action if nonnull.
|
void | whenGreater(float c, Runnable action)
wait until value greater than c, then run action if nonnull.
|
void | whenGreaterEqual(float c, Runnable action)
wait until value greater than or equal to c, then run action if nonnull.
|
void | whenLess(float c, Runnable action)
wait until value less than c, then run action if nonnull.
|
void | whenLessEqual(float c, Runnable action)
wait until value less than or equal to c, then run action if nonnull.
|
void | whenNotEqual(float c, Runnable action)
wait until value not equal to c, then run action if nonnull.
|
public WaitableFloat(float initialValue)
Make a new WaitableFloat with the given initial value,
and using its own internal lock.
public WaitableFloat(float initialValue, Object lock)
Make a new WaitableFloat with the given initial value,
and using the supplied lock.
public float add(float amount)
public boolean commit(float assumedValue, float newValue)
public float divide(float factor)
public float multiply(float factor)
public float set(float newValue)
public float subtract(float amount)
public void whenEqual(float c, Runnable action)
Wait until value equals c, then run action if nonnull.
The action is run with the synchronization lock held.
public void whenGreater(float c, Runnable action)
wait until value greater than c, then run action if nonnull.
The action is run with the synchronization lock held.
public void whenGreaterEqual(float c, Runnable action)
wait until value greater than or equal to c, then run action if nonnull.
The action is run with the synchronization lock held.
public void whenLess(float c, Runnable action)
wait until value less than c, then run action if nonnull.
The action is run with the synchronization lock held.
public void whenLessEqual(float c, Runnable action)
wait until value less than or equal to c, then run action if nonnull.
The action is run with the synchronization lock held.
public void whenNotEqual(float c, Runnable action)
wait until value not equal to c, then run action if nonnull.
The action is run with the synchronization lock held.