Class 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 Detail

      • m_Once

        protected boolean m_Once
        whether to execute the traversal only once.
    • Constructor Detail

      • OptionTraverser

        public OptionTraverser()
    • Method Detail

      • 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.
      • 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 class AbstractActorTemplate
        Returns:
        true if interactive