ProgramixGenericLib v5.0.1

com.programix.thread.ix
Class WaiterIx.Expression

java.lang.Object
  extended by com.programix.thread.ix.WaiterIx.Expression
Enclosing class:
WaiterIx

public abstract static class WaiterIx.Expression
extends Object

Used to provide WaiterIx.Condition with a boolean expression to evaluate by subclassing and implementing the isTrue() method. An Expression is passed into the createCondition method of WaiterIx.

When these two methods are called from WaiterIx and WaiterIx.Condition, the calling thread will be holding a lock on the object specified as a parameter to the constructor for WaitFor.

Author:
Paul Hyde

Constructor Summary
WaiterIx.Expression()
           
 
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
 

Constructor Detail

WaiterIx.Expression

public WaiterIx.Expression()
Method Detail

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.


ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.