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

All Implemented Interfaces:
    Cloneable, Comparable, Executor

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

[ Introduction to this package. ]
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedChar:
value_
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable:
lock_
Constructor:
 public WaitableChar(char initialValue) 
 public WaitableChar(char initialValue,
    Object lock) 
    Make a new WaitableChar with the given initial value, and using the supplied lock. *
Method from EDU.oswego.cs.dl.util.concurrent.WaitableChar Summary:
add,   commit,   divide,   multiply,   set,   subtract,   whenEqual,   whenGreater,   whenGreaterEqual,   whenLess,   whenLessEqual,   whenNotEqual
Methods from EDU.oswego.cs.dl.util.concurrent.SynchronizedChar:
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.WaitableChar Detail:
 public char add(char amount) 
 public boolean commit(char assumedValue,
    char newValue) 
 public char divide(char factor) 
 public char multiply(char factor) 
 public char set(char newValue) 
 public char subtract(char amount) 
 public  void whenEqual(char 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(char 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(char 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(char 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(char 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(char 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. *