- Enclosing class:
public abstract static class Monitor.Guard extends java.lang.ObjectA boolean condition for which a thread may wait. A
Guardis associated with a single
Monitor. The monitor may check the guard at arbitrary times from any thread occupying the monitor, so code should not be written to rely on how often a guard might or might not be checked.
Guardis passed into any method of a
Monitorother than the one it is associated with, an
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
isSatisfied()Evaluates this guard's boolean condition.
public abstract boolean isSatisfied()Evaluates this guard's boolean condition. This method is always called with the associated monitor already occupied. Implementations of this method must depend only on state protected by the associated monitor, and must not modify that state.