public final class BooleanCondition extends Object
Constructor and Description |
---|
BooleanCondition() |
Modifier and Type | Method and Description |
---|---|
boolean |
await(boolean state)
Wait for our state to match the passed value.
|
boolean |
get()
Query the state without blocking.
|
void |
set(boolean state)
Set the state to the passed value.
|
void |
wakeUpAllWaiters()
Wake up other threads that are waiting in
await(boolean) . |
public boolean await(boolean state)
state
- State to wait for.wakeUpAllWaiters()
.public void set(boolean state)
state
- The new state.public boolean get()
public void wakeUpAllWaiters()
await(boolean)
.Copyright © 2000-2014. All Rights Reserved.