com.ibm.retail.AEF.automation
Class OrCondition

java.lang.Object
  |
  +--com.ibm.retail.AEF.automation.AbstractCondition
        |
        +--com.ibm.retail.AEF.automation.OrCondition
All Implemented Interfaces:
Condition, com.ibm.retail.AEF.automation.EvaluateConditionListener

public class OrCondition
extends AbstractCondition
implements Condition, com.ibm.retail.AEF.automation.EvaluateConditionListener

OrCondition uses an array of PropertyConditions. When any of the conditions evaluates to true, then the lock associated with this condition is notified.


Field Summary
protected  com.ibm.retail.AEF.automation.Condition[] conditions
           
 
Fields inherited from class com.ibm.retail.AEF.automation.AbstractCondition
counterLock, dataProvider, eligible, id, idCounter, index, listeners, lock, manager, session
 
Constructor Summary
OrCondition(com.ibm.retail.AEF.automation.Condition[] conditions)
          Constructs the condition
 
Method Summary
 void conditionEvaluated(com.ibm.retail.AEF.automation.Condition condition, boolean flag)
          Called by a condition when the condition is evaluated.
(package private) static java.lang.String copyright()
           
 void currentValues(java.util.HashMap values)
          Populate the HashMap with property name/current value pairs included in the condition.
 boolean evaluate()
          Examines each of the child conditions immediately and determines whether they are all true.
 java.lang.String explain()
          Returns a string explaining this condition.
 com.ibm.retail.AEF.automation.Condition makeOpposite()
          Makes a new condition which is the logical opposite of this condition.
 void setConditionLock(com.ibm.retail.AEF.thread.ConditionLock lock)
          Sets the condition lock associated with this object.
 void setEligible(boolean flag)
          Sets the condition eligible for evaluation.
 void setPOSDataProvider(com.ibm.retail.AEF.data.POSDataProvider dataProvider)
          Sets the POSDataProvider associated with this condition.
 
Methods inherited from class com.ibm.retail.AEF.automation.AbstractCondition
addEvaluateListener, getID, getIndex, getNextID, getPOSDataProvider, getSession, getTerminalNumber, isEligible, notifyEvaluateConditionListeners, removeEvaluateListener, setID, setIndex, setLockManager, setSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.retail.AEF.automation.Condition
addEvaluateListener, getID, getIndex, getPOSDataProvider, getSession, getTerminalNumber, isEligible, removeEvaluateListener, setID, setIndex, setLockManager, setSession
 

Field Detail

conditions

protected com.ibm.retail.AEF.automation.Condition[] conditions
Constructor Detail

OrCondition

public OrCondition(com.ibm.retail.AEF.automation.Condition[] conditions)
Constructs the condition

Method Detail

copyright

static java.lang.String copyright()

setPOSDataProvider

public void setPOSDataProvider(com.ibm.retail.AEF.data.POSDataProvider dataProvider)
Sets the POSDataProvider associated with this condition.

Specified by:
setPOSDataProvider in interface Condition
Overrides:
setPOSDataProvider in class AbstractCondition
Parameters:
dataProvider - The POSDataProvider which will provide property change events to this condition.

conditionEvaluated

public void conditionEvaluated(com.ibm.retail.AEF.automation.Condition condition,
                               boolean flag)
Called by a condition when the condition is evaluated.

Specified by:
conditionEvaluated in interface com.ibm.retail.AEF.automation.EvaluateConditionListener

setEligible

public void setEligible(boolean flag)
Sets the condition eligible for evaluation.

Specified by:
setEligible in interface Condition
Overrides:
setEligible in class AbstractCondition
Parameters:
flag - Set to true to make this condition eligible for evaluation.

evaluate

public boolean evaluate()
Examines each of the child conditions immediately and determines whether they are all true.

Specified by:
evaluate in interface Condition
Returns:
boolean True if the condition evaluates to true.

makeOpposite

public com.ibm.retail.AEF.automation.Condition makeOpposite()
Makes a new condition which is the logical opposite of this condition.

Specified by:
makeOpposite in interface Condition
Returns:
Condition

explain

public java.lang.String explain()
Returns a string explaining this condition.

Specified by:
explain in interface Condition
Returns:
String

currentValues

public void currentValues(java.util.HashMap values)
Populate the HashMap with property name/current value pairs included in the condition. If a key is already in the HashMap, the new value will not override the value already in the map for the key.

Specified by:
currentValues in interface Condition
Parameters:
values -

setConditionLock

public void setConditionLock(com.ibm.retail.AEF.thread.ConditionLock lock)
Sets the condition lock associated with this object.

Specified by:
setConditionLock in interface Condition
Overrides:
setConditionLock in class AbstractCondition
Parameters:
lock -


Copyright © 2004 IBM. All Rights Reserved.
Generated: July 19 2004