| java.lang.Object EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean
All known Subclasses: EDU.oswego.cs.dl.util.concurrent.WaitableBoolean,
Field Summary | |
protected boolean | value_ |
Constructor Summary | |
public | SynchronizedBoolean(boolean initialValue) Make a new SynchronizedBoolean with the given initial value,
and using its own internal lock. | public | SynchronizedBoolean(boolean initialValue, Object lock) Make a new SynchronizedBoolean with the given initial value,
and using the supplied lock. |
value_ | protected boolean value_(Code) | | |
SynchronizedBoolean | public SynchronizedBoolean(boolean initialValue)(Code) | | Make a new SynchronizedBoolean with the given initial value,
and using its own internal lock.
|
SynchronizedBoolean | public SynchronizedBoolean(boolean initialValue, Object lock)(Code) | | Make a new SynchronizedBoolean with the given initial value,
and using the supplied lock.
|
and | public boolean and(boolean b)(Code) | | Set value to value & b.
the new value |
commit | public boolean commit(boolean assumedValue, boolean newValue)(Code) | | Set value to newValue only if it is currently assumedValue.
true if successful |
compareTo | public int compareTo(boolean other)(Code) | | |
complement | public boolean complement()(Code) | | Set the value to its complement
the new value |
get | final public boolean get()(Code) | | Return the current value
|
hashCode | public int hashCode()(Code) | | |
or | public boolean or(boolean b)(Code) | | Set value to value | b.
the new value |
set | public boolean set(boolean newValue)(Code) | | Set to newValue.
the old value |
swap | public boolean swap(SynchronizedBoolean other)(Code) | | 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.)
the new value |
xor | public boolean xor(boolean b)(Code) | | Set value to value ^ b.
the new value |
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable | final protected Object lock_(Code)(Java Doc)
|
|
|