Home » concurrent-sources » EDU.oswego.cs.dl.util.concurrent » [javadoc | source]
EDU.oswego.cs.dl.util.concurrent
public class: WaitableFloat [javadoc | source]
java.lang.Object
   EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable
      EDU.oswego.cs.dl.util.concurrent.SynchronizedFloat
         EDU.oswego.cs.dl.util.concurrent.WaitableFloat

All Implemented Interfaces:
    Cloneable, Comparable, Executor

A class useful for offloading waiting and signalling operations on single float variables.

[ Introduction to this package. ]
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedFloat:
value_
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable:
lock_
Constructor:
 public WaitableFloat(float initialValue) 
 public WaitableFloat(float initialValue,
    Object lock) 
    Make a new WaitableFloat with the given initial value, and using the supplied lock. *
Method from EDU.oswego.cs.dl.util.concurrent.WaitableFloat Summary:
add,   commit,   divide,   multiply,   set,   subtract,   whenEqual,   whenGreater,   whenGreaterEqual,   whenLess,   whenLessEqual,   whenNotEqual
Methods from EDU.oswego.cs.dl.util.concurrent.SynchronizedFloat:
add,   commit,   compareTo,   compareTo,   compareTo,   divide,   equals,   get,   hashCode,   multiply,   set,   subtract,   swap,   toString
Methods from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable:
execute,   getLock
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from EDU.oswego.cs.dl.util.concurrent.WaitableFloat Detail:
 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) throws InterruptedException 
    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) throws InterruptedException 
    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) 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. *
 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. *
 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. *
 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. *