Class ArraySubset

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

    public class ArraySubset
    extends AbstractTransformer
    Generates a subset of the array, using the specified array elements.

    - accepts:
    - generates:

    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 name of the actor.
        default: ArraySubset
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
    -skip (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
    -stop-flow-on-error (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
    -elements <adams.core.Range> (property: elements)
        The range of elements to pick from the array; A range is a comma-separated 
        list of single 1-based indices or sub-ranges of indices ('start-end'); '
        inv(...)' inverts the range '...'; the following placeholders can be used 
        as well: first, second, third, last_2, last_1, last
        default: first-last
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Elements

        protected Range m_Elements
        the elements of the subset to extract.
    • Constructor Detail

      • ArraySubset

        public ArraySubset()
    • Method Detail

      • setElements

        public void setElements​(Range value)
        Sets the array elements to pick.
        value - the range of elements
      • getElements

        public Range getElements()
        Returns the array elements to pick.
        the range of elements
      • elementsTipText

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

        public Class[] accepts()
        Returns the class that the consumer accepts.
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
      • doExecute

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