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

All Implemented Interfaces:
    Cloneable, Comparable, Executor

Direct Known Subclasses:

A class useful for offloading synch for boolean instance variables.

[ Introduction to this package. ]
Field Summary
protected  boolean value_     
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable:
 public SynchronizedBoolean(boolean initialValue) 
 public SynchronizedBoolean(boolean initialValue,
    Object lock) 
    Make a new SynchronizedBoolean with the given initial value, and using the supplied lock. *
Method from EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean Summary:
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.SynchronizedBoolean Detail:
 public boolean and(boolean b) 
    Set value to value & b.
 public boolean commit(boolean assumedValue,
    boolean newValue) 
    Set value to newValue only if it is currently assumedValue.
 public int compareTo(boolean other) 
 public int compareTo(SynchronizedBoolean other) 
 public int compareTo(Object other) 
 public boolean complement() 
    Set the value to its complement
 public boolean equals(Object other) 
 public final boolean get() 
    Return the current value
 public int hashCode() 
 public boolean or(boolean b) 
    Set value to value | b.
 public boolean set(boolean newValue) 
    Set to newValue.
 public boolean swap(SynchronizedBoolean other) 
    Atomically swap values with another SynchronizedBoolean. Uses identityHashCode to avoid deadlock when two SynchronizedBooleans attempt to simultaneously swap with each other. (Note: Ordering via identyHashCode is not strictly guaranteed by the language specification to return unique, orderable values, but in practice JVMs rely on them being unique.)
 public String toString() 
 public boolean xor(boolean b) 
    Set value to value ^ b.