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

All Implemented Interfaces:
    Cloneable, Comparable, Executor

A class useful for offloading synch for boolean instance variables.

[ Introduction to this package. ]
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean:
value_
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable:
lock_
Constructor:
 public WaitableBoolean(boolean initialValue) 
 public WaitableBoolean(boolean initialValue,
    Object lock) 
    Make a new WaitableBoolean with the given initial value, and using the supplied lock. *
Method from EDU.oswego.cs.dl.util.concurrent.WaitableBoolean Summary:
and,   commit,   complement,   or,   set,   whenEqual,   whenFalse,   whenNotEqual,   whenTrue,   xor
Methods from EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean:
and,   commit,   compareTo,   compareTo,   compareTo,   complement,   equals,   get,   hashCode,   or,   set,   swap,   toString,   xor
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.WaitableBoolean Detail:
 public boolean and(boolean b) 
 public boolean commit(boolean assumedValue,
    boolean newValue) 
 public boolean complement() 
 public boolean or(boolean b) 
 public boolean set(boolean newValue) 
 public  void whenEqual(boolean 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 whenFalse(Runnable action) throws InterruptedException 
    Wait until value is false, then run action if nonnull. The action is run with the synchronization lock held. *
 public  void whenNotEqual(boolean 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. *
 public  void whenTrue(Runnable action) throws InterruptedException 
    wait until value is true, then run action if nonnull. The action is run with the synchronization lock held. *
 public boolean xor(boolean b)