| java.lang.Object EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable EDU.oswego.cs.dl.util.concurrent.SynchronizedDouble EDU.oswego.cs.dl.util.concurrent.WaitableDouble
Constructor Summary | |
public | WaitableDouble(double initialValue) Make a new WaitableDouble with the given initial value,
and using its own internal lock. | public | WaitableDouble(double initialValue, Object lock) Make a new WaitableDouble with the given initial value,
and using the supplied lock. |
Method Summary | |
public double | add(double amount) | public boolean | commit(double assumedValue, double newValue) | public double | divide(double factor) | public double | multiply(double factor) | public double | set(double newValue) | public double | subtract(double amount) | public void | whenEqual(double c, Runnable action) Wait until value equals c, then run action if nonnull. | public void | whenGreater(double c, Runnable action) wait until value greater than c, then run action if nonnull. | public void | whenGreaterEqual(double c, Runnable action) wait until value greater than or equal to c, then run action if nonnull. | public void | whenLess(double c, Runnable action) wait until value less than c, then run action if nonnull. | public void | whenLessEqual(double c, Runnable action) wait until value less than or equal to c, then run action if nonnull. | public void | whenNotEqual(double c, Runnable action) wait until value not equal to c, then run action if nonnull. |
WaitableDouble | public WaitableDouble(double initialValue)(Code) | | Make a new WaitableDouble with the given initial value,
and using its own internal lock.
|
WaitableDouble | public WaitableDouble(double initialValue, Object lock)(Code) | | Make a new WaitableDouble with the given initial value,
and using the supplied lock.
|
add | public double add(double amount)(Code) | | |
commit | public boolean commit(double assumedValue, double newValue)(Code) | | |
divide | public double divide(double factor)(Code) | | |
multiply | public double multiply(double factor)(Code) | | |
set | public double set(double newValue)(Code) | | |
subtract | public double subtract(double amount)(Code) | | |
whenEqual | public void whenEqual(double c, Runnable action) throws InterruptedException(Code) | | Wait until value equals c, then run action if nonnull.
The action is run with the synchronization lock held.
|
whenGreater | public void whenGreater(double c, Runnable action) throws InterruptedException(Code) | | wait until value greater than c, then run action if nonnull.
The action is run with the synchronization lock held.
|
whenGreaterEqual | public void whenGreaterEqual(double c, Runnable action) throws InterruptedException(Code) | | wait until value greater than or equal to c, then run action if nonnull.
The action is run with the synchronization lock held.
|
whenLess | public void whenLess(double c, Runnable action) throws InterruptedException(Code) | | wait until value less than c, then run action if nonnull.
The action is run with the synchronization lock held.
|
whenLessEqual | public void whenLessEqual(double c, Runnable action) throws InterruptedException(Code) | | wait until value less than or equal to c, then run action if nonnull.
The action is run with the synchronization lock held.
|
whenNotEqual | public void whenNotEqual(double c, Runnable action) throws InterruptedException(Code) | | wait until value not equal to c, then run action if nonnull.
The action is run with the synchronization lock held.
|
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedDouble | protected double value_(Code)(Java Doc)
|
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable | final protected Object lock_(Code)(Java Doc)
|
|
|