Package adams.flow.condition.bool
Class Not
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,ShallowCopySupporter<BooleanCondition>
,SizeOfHandler
,Stoppable
,BooleanCondition
,Serializable
public class Not extends AbstractBooleanCondition
Negates the output of the specified condition.
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> (property: condition) The condition to evaluate and negate. default: adams.flow.condition.bool.Expression
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BooleanCondition
m_Condition
the condition to evaluate and negate.-
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 Not()
Default constructor.Not(BooleanCondition condition)
Initializes Not with the specified base condition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]
accepts()
Returns the class that the consumer accepts.String
conditionTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected boolean
doEvaluate(Actor owner, Token token)
Evaluates the condition.BooleanCondition
getCondition()
Returns the current condition.protected BooleanCondition
getDefaultCondition()
Returns the default condition.String
getQuickInfo()
Returns the quick info string to be displayed in the flow editor.String
globalInfo()
Returns a string describing the object.void
setCondition(BooleanCondition value)
Sets the condition.String
setUp(Actor owner)
Configures the condition.void
stopExecution()
Stops the execution.-
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
-
-
-
-
Field Detail
-
m_Condition
protected BooleanCondition m_Condition
the condition to evaluate and negate.
-
-
Constructor Detail
-
Not
public Not()
Default constructor.
-
Not
public Not(BooleanCondition condition)
Initializes Not with the specified base condition.- Parameters:
condition
- the condition to negate
-
-
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
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
getDefaultCondition
protected BooleanCondition getDefaultCondition()
Returns the default condition.- Returns:
- the default condition
-
setCondition
public void setCondition(BooleanCondition value)
Sets the condition.- Parameters:
value
- the condition
-
getCondition
public BooleanCondition getCondition()
Returns the current condition.- Returns:
- the condition
-
conditionTipText
public String conditionTipText()
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 quick info
-
accepts
public Class[] accepts()
Returns the class that the consumer accepts.- Specified by:
accepts
in interfaceBooleanCondition
- Specified by:
accepts
in classAbstractBooleanCondition
- Returns:
- Unknown
-
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
-
doEvaluate
protected boolean doEvaluate(Actor owner, Token token)
Evaluates the condition.- Specified by:
doEvaluate
in classAbstractBooleanCondition
- Parameters:
owner
- the owning actortoken
- the current token passing through the actor- Returns:
- always true
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecution
in interfaceBooleanCondition
- Specified by:
stopExecution
in interfaceStoppable
- Overrides:
stopExecution
in classAbstractBooleanCondition
-
-