Class AbstractAttributeCapabilities

  • 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
    Direct Known Subclasses:
    AdamsInstanceCapabilities, WekaCapabilities

    public abstract class AbstractAttributeCapabilities
    extends adams.flow.condition.bool.AbstractBooleanCondition
    Ancestor for capabilities-based conditions.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected weka.core.Capabilities m_ActualCapabilities
      the capabilities object to use.
      protected Capability[] m_Capabilities
      the class index.
      protected boolean m_Invert
      whether to invert the matching sense.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract Class[] accepts()
      Returns the class that the consumer accepts.
      String capabilitiesTipText()
      Returns the tip text for this property.
      void defineOptions()
      Adds options to the internal list of options.
      protected abstract boolean doEvaluate​(adams.flow.core.Actor owner, adams.flow.core.Token token)
      Performs the actual evaluation.
      Capability[] getCapabilities()
      Returns the capabilities.
      boolean getInvert()
      Returns whether the matching sense of the capabilities is inverted.
      String getQuickInfo()
      Returns the quick info string to be displayed in the flow editor.
      String invertTipText()
      Returns the tip text for this property.
      protected void reset()
      Resets the scheme.
      void setCapabilities​(Capability[] value)
      Sets the capabilities.
      void setInvert​(boolean value)
      Sets whether to invert the matching sense of the capabilities.
      String setUp​(adams.flow.core.Actor owner)
      Configures the condition.
      • Methods inherited from class adams.flow.condition.bool.AbstractBooleanCondition

        evaluate, preEvaluate, shallowCopy, shallowCopy, stopExecution
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Field Detail

      • m_Capabilities

        protected Capability[] m_Capabilities
        the class index.
      • m_Invert

        protected boolean m_Invert
        whether to invert the matching sense.
      • m_ActualCapabilities

        protected weka.core.Capabilities m_ActualCapabilities
        the capabilities object to use.
    • Constructor Detail

      • AbstractAttributeCapabilities

        public AbstractAttributeCapabilities()
    • Method Detail

      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.core.option.AbstractOptionHandler
      • reset

        protected void reset()
        Resets the scheme.
        Overrides:
        reset in class adams.core.option.AbstractOptionHandler
      • setCapabilities

        public void setCapabilities​(Capability[] value)
        Sets the capabilities.
        Parameters:
        value - the capabilities
      • getCapabilities

        public Capability[] getCapabilities()
        Returns the capabilities.
        Returns:
        the capabilities
      • capabilitiesTipText

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

        public void setInvert​(boolean value)
        Sets whether to invert the matching sense of the capabilities.
        Parameters:
        value - if true then the matching sense gets inverted
      • getInvert

        public boolean getInvert()
        Returns whether the matching sense of the capabilities is inverted.
        Returns:
        true if the matching sense is inverted
      • invertTipText

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

        public String getQuickInfo()
        Returns the quick info string to be displayed in the flow editor.
        Specified by:
        getQuickInfo in interface adams.flow.condition.bool.BooleanCondition
        Specified by:
        getQuickInfo in interface adams.core.QuickInfoSupporter
        Specified by:
        getQuickInfo in class adams.flow.condition.bool.AbstractBooleanCondition
        Returns:
        always null
      • accepts

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

        public String setUp​(adams.flow.core.Actor owner)
        Configures the condition.
        Specified by:
        setUp in interface adams.flow.condition.bool.BooleanCondition
        Overrides:
        setUp in class adams.flow.condition.bool.AbstractBooleanCondition
        Parameters:
        owner - the actor this condition belongs to
        Returns:
        null if everything is fine, otherwise error message
      • doEvaluate

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