com.programix.thread
Class Waiter.Expression
java.lang.Object
com.programix.thread.Waiter.Expression
- Enclosing class:
- Waiter
public abstract static class Waiter.Expression
- extends Object
Used to provide Waiter.Condition with a boolean expression
to evaluate by subclassing and implementing the isTrue()
method.
An Expression is passed into the
createCondition
method of Waiter.
When these two methods are called from Waiter and
Waiter.Condition, the calling thread will be holding a lock on
the object specified as a parameter to the constructor
for WaitFor.
- Author:
- Paul Hyde
|
Method Summary |
boolean |
isFalse()
Returns true when the expression currently evaluates to
be false. |
abstract boolean |
isTrue()
Returns true when the expression currently evaluates to
be, well, true. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Waiter.Expression
public Waiter.Expression()
isTrue
public abstract boolean isTrue()
- Returns true when the expression currently evaluates to
be, well, true. Implemented by subclasses.
isFalse
public boolean isFalse()
- Returns true when the expression currently evaluates to
be false. The implementation on this class simply
does:
return !isTrue();
Feel free to override it if you have a more efficient way of
determining that it is false.
Copyright © 2001-2007
Programix Incorporated.
All rights reserved.
ProgramixGenericLib is free
and is
OSI Certified
Open Source Software under the BSD
license.