public class SynchronizedBoolean
extends java.lang.Object
| Constructor and Description |
|---|
SynchronizedBoolean() |
SynchronizedBoolean(boolean initValue) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAndSet(boolean oldValue,
boolean newValue)
If the value is oldValue, set to newValue and return true, otherwise return false.
|
boolean |
getValue() |
void |
setValue(boolean newValue) |
void |
waitUntil(boolean value) |
boolean |
waitUntil(boolean value,
int timeout) |
public SynchronizedBoolean()
public SynchronizedBoolean(boolean initValue)
public boolean getValue()
public void setValue(boolean newValue)
public void waitUntil(boolean value)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic boolean waitUntil(boolean value,
int timeout)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic boolean getAndSet(boolean oldValue,
boolean newValue)