Package adams.flow.execution.debug
Class MultiScopeRestriction
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.execution.debug.AbstractScopeRestriction
-
- adams.flow.execution.debug.MultiScopeRestriction
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
public class MultiScopeRestriction extends AbstractScopeRestriction
Combines multiple scope restrictions.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-restriction <adams.flow.execution.debug.AbstractScopeRestriction> [-restriction ...] (property: restrictions) The array of scope restrictions to use. default:
-combination <AND|OR|XOR> (property: combination) How to combine the results of the specified scope restrictions; AND: all must be true, OR: at least one must be true, XOR: exactly one must be true. default: AND
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultiScopeRestriction.ScopeCombination
How the scope checks get combined.
-
Field Summary
Fields Modifier and Type Field Description protected MultiScopeRestriction.ScopeCombination
m_Combination
how to apply the scope restrictions.protected AbstractScopeRestriction[]
m_Restrictions
the restrictions.-
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 MultiScopeRestriction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkScope(Actor actor, ExecutionStage stage)
Checks whether the specified actor falls within the scope.String
combinationTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.MultiScopeRestriction.ScopeCombination
getCombination()
Returns how to combine the results of the restrictions.AbstractScopeRestriction[]
getRestrictions()
Returns the restrictions in use.String
globalInfo()
Returns a string describing the object.String
restrictionsTipText()
Returns the tip text for this property.void
setCombination(MultiScopeRestriction.ScopeCombination value)
Sets how to combine the results of the restrictions.void
setRestrictions(AbstractScopeRestriction[] value)
Sets the scope restrictions to use.-
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_Restrictions
protected AbstractScopeRestriction[] m_Restrictions
the restrictions.
-
m_Combination
protected MultiScopeRestriction.ScopeCombination m_Combination
how to apply the scope restrictions.
-
-
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
-
setRestrictions
public void setRestrictions(AbstractScopeRestriction[] value)
Sets the scope restrictions to use.- Parameters:
value
- the restrictions to use
-
getRestrictions
public AbstractScopeRestriction[] getRestrictions()
Returns the restrictions in use.- Returns:
- the restrictions
-
restrictionsTipText
public String restrictionsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setCombination
public void setCombination(MultiScopeRestriction.ScopeCombination value)
Sets how to combine the results of the restrictions.- Parameters:
value
- the combination
-
getCombination
public MultiScopeRestriction.ScopeCombination getCombination()
Returns how to combine the results of the restrictions.- Returns:
- the combination
-
combinationTipText
public String combinationTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
checkScope
public boolean checkScope(Actor actor, ExecutionStage stage)
Checks whether the specified actor falls within the scope.- Specified by:
checkScope
in classAbstractScopeRestriction
- Parameters:
actor
- the actor to checkstage
- the execution stage- Returns:
- true if within scope
-
-