Class AdamsInstanceCapabilities

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.ShallowCopySupporter<adams.flow.condition.bool.BooleanCondition>, adams.core.SizeOfHandler, adams.core.Stoppable, adams.flow.condition.bool.BooleanCondition, Serializable

    public class AdamsInstanceCapabilities
    extends AbstractAttributeCapabilities
    Filters adams.data.instance.Instance based on defined capabilities. Only objects that match the capabilities will be passed on, all others get discarded.
    The matching sense can be inverted as well.

    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
     
    -capability <NOMINAL_ATTRIBUTES|BINARY_ATTRIBUTES|UNARY_ATTRIBUTES|EMPTY_NOMINAL_ATTRIBUTES|NUMERIC_ATTRIBUTES|DATE_ATTRIBUTES|STRING_ATTRIBUTES|RELATIONAL_ATTRIBUTES|MISSING_VALUES|NO_CLASS|NOMINAL_CLASS|BINARY_CLASS|UNARY_CLASS|EMPTY_NOMINAL_CLASS|NUMERIC_CLASS|DATE_CLASS|STRING_CLASS|RELATIONAL_CLASS|MISSING_CLASS_VALUES|ONLY_MULTIINSTANCE> [-capability ...] (property: capabilities)
        The capabilities that the objects must match.
        default: 
     
    -invert (property: invert)
        If set to true, then objects that failed the capabilities test will pass 
        through and all others get discarded.
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • AdamsInstanceCapabilities

        public AdamsInstanceCapabilities()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Specified by:
        accepts in interface adams.flow.condition.bool.BooleanCondition
        Specified by:
        accepts in class AbstractAttributeCapabilities
        Returns:
        Unknown
      • doEvaluate

        protected boolean doEvaluate​(adams.flow.core.Actor owner,
                                     adams.flow.core.Token token)
        Performs the actual evaluation.
        Specified by:
        doEvaluate in class AbstractAttributeCapabilities
        Parameters:
        owner - the owning actor
        token - the current token passing through
        Returns:
        the result of the evaluation