Package adams.flow.template
Class OptionTraverser
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.template.AbstractActorTemplate
-
- adams.flow.template.OptionTraverser
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractActorTemplate>
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
OptionTraverserWithSpreadSheetDisplay
public class OptionTraverser extends AbstractActorTemplate
Generates a sub-flow that displays the result of the specified option traversal algorithm, e.g., for displaying currently attached variables.
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
-name <java.lang.String> (property: name) The new name for the actor; leave empty to use current. default:
-traverser <adams.core.option.OptionTraverser> (property: traverser) The traverser to use. default: adams.core.option.VariableLister
-start <ROOT|PARENT> (property: start) Defines where to start the traversal from. default: ROOT
-once (property: once) If enabled, the option traversal gets executed only once.
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_Once
whether to execute the traversal only once.protected OptionTraverser.TraversalStart
m_Start
the start of the traversal.protected OptionTraverser
m_Traverser
the traverser to use.-
Fields inherited from class adams.flow.template.AbstractActorTemplate
m_Name
-
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 OptionTraverser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addDisplay(MutableActorHandler handler)
Adds the display actors.void
defineOptions()
Adds options to the internal list of options.protected Actor
doGenerate()
Generates the actor.boolean
getOnce()
Returns whether to execute the traversal only once.OptionTraverser.TraversalStart
getStart()
Returns where to start the traversal.OptionTraverser
getTraverser()
Returns the traverser to use.String
globalInfo()
Returns a string describing the object.boolean
isInteractive()
Whether the flow generated is an interactive one.String
onceTipText()
Returns the tip text for this property.void
setOnce(boolean value)
Sets whether to execute the traversal only once.void
setStart(OptionTraverser.TraversalStart value)
Sets where to start the traversal.void
setTraverser(OptionTraverser value)
Sets the traverser to use.String
startTipText()
Returns the tip text for this property.String
traverserTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.template.AbstractActorTemplate
compareTo, equals, forCommandLine, forName, generate, getBaselineCorrections, getDefaultName, getName, nameTipText, postGenerate, preGenerate, setName, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Traverser
protected OptionTraverser m_Traverser
the traverser to use.
-
m_Start
protected OptionTraverser.TraversalStart m_Start
the start of the traversal.
-
m_Once
protected boolean m_Once
whether to execute the traversal only once.
-
-
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 classAbstractActorTemplate
-
setTraverser
public void setTraverser(OptionTraverser value)
Sets the traverser to use.- Parameters:
value
- the traverser
-
getTraverser
public OptionTraverser getTraverser()
Returns the traverser to use.- Returns:
- the traverser
-
traverserTipText
public String traverserTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStart
public void setStart(OptionTraverser.TraversalStart value)
Sets where to start the traversal.- Parameters:
value
- the starting point
-
getStart
public OptionTraverser.TraversalStart getStart()
Returns where to start the traversal.- Returns:
- the starting point
-
startTipText
public String startTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnce
public void setOnce(boolean value)
Sets whether to execute the traversal only once.- Parameters:
value
- true if only once
-
getOnce
public boolean getOnce()
Returns whether to execute the traversal only once.- Returns:
- true if only once
-
onceTipText
public String onceTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
addDisplay
protected void addDisplay(MutableActorHandler handler)
Adds the display actors.- Parameters:
handler
- the handler to add the display actors to
-
isInteractive
public boolean isInteractive()
Whether the flow generated is an interactive one.- Specified by:
isInteractive
in classAbstractActorTemplate
- Returns:
- true if interactive
-
doGenerate
protected Actor doGenerate()
Generates the actor.- Specified by:
doGenerate
in classAbstractActorTemplate
- Returns:
- the generated acto
-
-