Package adams.flow.condition.bool
Class AbstractMultiCondition
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.condition.bool.AbstractBooleanCondition
-
- adams.flow.condition.bool.AbstractMultiCondition
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,ShallowCopySupporter<BooleanCondition>,SizeOfHandler,Stoppable,BooleanCondition,Serializable
public abstract class AbstractMultiCondition extends AbstractBooleanCondition
Ancestor for conditions that use multiple sub-conditions.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BooleanCondition[]m_Conditionsthe conditions to evaluate.-
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 Modifier Constructor Description protectedAbstractMultiCondition()Default constructorprotectedAbstractMultiCondition(BooleanCondition[] conditions)Initializes the object with the specified conditions.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddCondition(BooleanCondition value)Adds the condition to the current ones.abstract StringconditionsTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.BooleanCondition[]getConditions()Returns the conditions to evaluate.StringgetQuickInfo()Returns the quick info string to be displayed in the flow editor.voidsetConditions(BooleanCondition[] value)Sets the conditions to evaluate.StringsetUp(Actor owner)Configures the condition.voidstopExecution()Stops the execution.-
Methods inherited from class adams.flow.condition.bool.AbstractBooleanCondition
accepts, doEvaluate, evaluate, preEvaluate, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, 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
-
-
-
-
Field Detail
-
m_Conditions
protected BooleanCondition[] m_Conditions
the conditions to evaluate.
-
-
Constructor Detail
-
AbstractMultiCondition
protected AbstractMultiCondition()
Default constructor
-
AbstractMultiCondition
protected AbstractMultiCondition(BooleanCondition[] conditions)
Initializes the object with the specified conditions.- Parameters:
conditions- the conditions to use
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
addCondition
public void addCondition(BooleanCondition value)
Adds the condition to the current ones.- Parameters:
value- the condition to add
-
setConditions
public void setConditions(BooleanCondition[] value)
Sets the conditions to evaluate.- Parameters:
value- the conditions
-
getConditions
public BooleanCondition[] getConditions()
Returns the conditions to evaluate.- Returns:
- the conditions
-
conditionsTipText
public abstract String conditionsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns the quick info string to be displayed in the flow editor.- Specified by:
getQuickInfoin interfaceBooleanCondition- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Specified by:
getQuickInfoin classAbstractBooleanCondition- Returns:
- the info or null if no info to be displayed
-
setUp
public String setUp(Actor owner)
Configures the condition.- Specified by:
setUpin interfaceBooleanCondition- Overrides:
setUpin classAbstractBooleanCondition- Parameters:
owner- the actor this condition belongs to- Returns:
- null if everything is fine, otherwise error message
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecutionin interfaceBooleanCondition- Specified by:
stopExecutionin interfaceStoppable- Overrides:
stopExecutionin classAbstractBooleanCondition
-
-