Package adams.flow.condition.bool
Class Or
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,ShallowCopySupporter<BooleanCondition>
,SizeOfHandler
,Stoppable
,BooleanCondition
,Serializable
public class Or extends AbstractMultiCondition
Performs a logical OR over all its sub-conditions, i.e., it evaluates to 'true' if any of the sub-conditions evaluates to 'true' as well.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-condition <adams.flow.condition.bool.AbstractBooleanCondition> [-condition ...] (property: conditions) The conditions to use for the logical OR. default:
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.flow.condition.bool.AbstractMultiCondition
m_Conditions
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description Or()
Default constructor.Or(BooleanCondition[] conditions)
Initializes the object with the specified conditions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]
accepts()
Returns the class that the consumer accepts.String
conditionsTipText()
Returns the tip text for this property.protected boolean
doEvaluate(Actor owner, Token token)
Performs the actual evaluation.String
globalInfo()
Returns a string describing the object.-
Methods inherited from class adams.flow.condition.bool.AbstractMultiCondition
addCondition, defineOptions, getConditions, getQuickInfo, setConditions, setUp, stopExecution
-
Methods inherited from class adams.flow.condition.bool.AbstractBooleanCondition
evaluate, preEvaluate, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Constructor Detail
-
Or
public Or()
Default constructor.
-
Or
public Or(BooleanCondition[] conditions)
Initializes the object with the specified conditions.- Parameters:
conditions
- the conditions to use
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
conditionsTipText
public String conditionsTipText()
Returns the tip text for this property.- Specified by:
conditionsTipText
in classAbstractMultiCondition
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
accepts
public Class[] accepts()
Returns the class that the consumer accepts.- Specified by:
accepts
in interfaceBooleanCondition
- Specified by:
accepts
in classAbstractBooleanCondition
- Returns:
- Unknown
-
doEvaluate
protected boolean doEvaluate(Actor owner, Token token)
Performs the actual evaluation.- Specified by:
doEvaluate
in classAbstractBooleanCondition
- Parameters:
owner
- the owning actortoken
- the current token passing through- Returns:
- the result of the evaluation
-
-