Class StringConstants

  • All Implemented Interfaces:
    AdditionalInformationHandler, ArrayProvider, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ArrayProvider, ErrorHandler, OutputProducer, Serializable, Comparable

    public class StringConstants
    extends AbstractArrayProvider
    A source for strings.

    Input/output:
    - generates:
       java.lang.String


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: StringConstants
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow execution at this level gets stopped in case this 
        actor encounters an error; the error gets propagated; useful for critical 
        actors.
        default: false
     
    -silent <boolean> (property: silent)
        If enabled, then no errors are output in the console; Note: the enclosing 
        actor handler must have this enabled as well.
        default: false
     
    -output-array <boolean> (property: outputArray)
        Whether to output the strings as an array or one by one.
        default: false
     
    -string <adams.core.base.BaseString> [-string ...] (property: strings)
        The strings to provide.
        default: 
     
    -conversion <adams.data.conversion.Conversion> (property: conversion)
        The type of conversion to perform.
        default: adams.data.conversion.StringToString
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Strings

        protected BaseString[] m_Strings
        the strings to provide.
      • m_Conversion

        protected Conversion m_Conversion
        the type of conversion.
    • Constructor Detail

      • StringConstants

        public StringConstants()
        Default constructor.
      • StringConstants

        public StringConstants​(BaseString[] strings)
        Initializes with the specified strings.
        Parameters:
        strings - the strings to use
      • StringConstants

        public StringConstants​(String[] strings)
        Initializes with the specified strings.
        Parameters:
        strings - the strings to use
    • Method Detail

      • addString

        public void addString​(String value)
        Adds the string.
        Parameters:
        value - the string to add
      • addString

        public void addString​(BaseString value)
        Adds the string.
        Parameters:
        value - the string to add
      • setStrings

        public void setStrings​(String[] value)
        Sets the strings to output.
        Parameters:
        value - the output
      • setStrings

        public void setStrings​(BaseString[] value)
        Sets the strings to output.
        Parameters:
        value - the output
      • getStrings

        public BaseString[] getStrings()
        Returns the strings to output.
        Returns:
        the output
      • stringsTipText

        public String stringsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setConversion

        public void setConversion​(Conversion value)
        Sets the type of conversion to perform.
        Parameters:
        value - the type of conversion
      • getConversion

        public Conversion getConversion()
        Returns the type of conversion to perform.
        Returns:
        the type of conversion
      • conversionTipText

        public String conversionTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message