Introduction to this package.
| Access | Constructor and Description |
|---|---|
| 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. |
| Modifier and Type | Method and Description |
|---|---|
| public float | add(float amount)
Overrides EDU. |
| public boolean | commit(float assumedValue, float newValue)
Overrides EDU. |
| public float | divide(float factor)
Overrides EDU. |
| public float | multiply(float factor)
Overrides EDU. |
| public float | set(float newValue)
Overrides EDU. |
| public float | subtract(float amount)
Overrides EDU. |
| public void | |
| public void | |
| public void | whenGreaterEqual(float c, Runnable action)
wait until value greater than or equal to c, then run action if nonnull. |
| public void | |
| public void | whenLessEqual(float c, Runnable action)
wait until value less than or equal to c, then run action if nonnull. |
| public void |
| WaitableFloat | back to summary |
|---|---|
| public WaitableFloat(float initialValue) Make a new WaitableFloat with the given initial value, and using its own internal lock. | |
| WaitableFloat | back to summary |
|---|---|
| public WaitableFloat(float initialValue, Object lock) Make a new WaitableFloat with the given initial value, and using the supplied lock. | |
| add | back to summary |
|---|---|
| public float add(float amount) Overrides EDU. Doc from EDU. Add amount to value (i.e., set value += amount)
| |
| commit | back to summary |
|---|---|
| public boolean commit(float assumedValue, float newValue) Overrides EDU. Doc from EDU. Set value to newValue only if it is currently assumedValue.
| |
| divide | back to summary |
|---|---|
| public float divide(float factor) Overrides EDU. Doc from EDU. Divide value by factor (i.e., set value /= factor)
| |
| multiply | back to summary |
|---|---|
| public float multiply(float factor) Overrides EDU. Doc from EDU. Multiply value by factor (i.e., set value *= factor)
| |
| set | back to summary |
|---|---|
| public float set(float newValue) Overrides EDU. Doc from EDU. Set to newValue.
| |
| subtract | back to summary |
|---|---|
| public float subtract(float amount) Overrides EDU. Doc from EDU. Subtract amount from value (i.e., set value -= amount)
| |
| whenEqual | back to summary |
|---|---|
| public void whenEqual(float c, Runnable action) throws InterruptedException Wait until value equals c, then run action if nonnull. The action is run with the synchronization lock held. | |
| whenGreater | back to summary |
|---|---|
| public void whenGreater(float c, Runnable action) throws InterruptedException wait until value greater than c, then run action if nonnull. The action is run with the synchronization lock held. | |
| whenGreaterEqual | back to summary |
|---|---|
| public void whenGreaterEqual(float c, Runnable action) throws InterruptedException wait until value greater than or equal to c, then run action if nonnull. The action is run with the synchronization lock held. | |
| whenLess | back to summary |
|---|---|
| public void whenLess(float c, Runnable action) throws InterruptedException wait until value less than c, then run action if nonnull. The action is run with the synchronization lock held. | |
| whenLessEqual | back to summary |
|---|---|
| public void whenLessEqual(float c, Runnable action) throws InterruptedException wait until value less than or equal to c, then run action if nonnull. The action is run with the synchronization lock held. | |
| whenNotEqual | back to summary |
|---|---|
| public void whenNotEqual(float c, Runnable action) throws InterruptedException wait until value not equal to c, then run action if nonnull. The action is run with the synchronization lock held. | |