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_Conditions
the 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 protected
AbstractMultiCondition()
Default constructorprotected
AbstractMultiCondition(BooleanCondition[] conditions)
Initializes the object with the specified conditions.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addCondition(BooleanCondition value)
Adds the condition to the current ones.abstract String
conditionsTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.BooleanCondition[]
getConditions()
Returns the conditions to evaluate.String
getQuickInfo()
Returns the quick info string to be displayed in the flow editor.void
setConditions(BooleanCondition[] value)
Sets the conditions to evaluate.String
setUp(Actor owner)
Configures the condition.void
stopExecution()
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:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in 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:
getQuickInfo
in interfaceBooleanCondition
- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Specified by:
getQuickInfo
in classAbstractBooleanCondition
- Returns:
- the info or null if no info to be displayed
-
setUp
public String setUp(Actor owner)
Configures the condition.- Specified by:
setUp
in interfaceBooleanCondition
- Overrides:
setUp
in 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:
stopExecution
in interfaceBooleanCondition
- Specified by:
stopExecution
in interfaceStoppable
- Overrides:
stopExecution
in classAbstractBooleanCondition
-
-