Lines Matching refs:state
29 * ConditionLock is a Lock with a built in state variable. This class
30 * provides the ability to wait for the state variable to be set to a
35 * waiting for the state variable to become a particular value and you
37 * lock until the state variable equals its desired value. <p>
43 private int state = 0;
55 state = initialState;
59 * Acquires the lock when the state variable equals the desired state.
61 * @param desiredState the desired state
68 while (state != desiredState) {
75 * Releases the lock, and sets the state to a new value.
76 * @param newState the new state
79 state = newState;