adams.flow.condition.bool
Class AdamsInstanceCapabilities

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.condition.bool.AbstractBooleanCondition
              extended by adams.flow.condition.bool.AbstractAttributeCapabilities
                  extended by adams.flow.condition.bool.AdamsInstanceCapabilities
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, ShallowCopySupporter<BooleanCondition>, SizeOfHandler, 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: 4853 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class adams.flow.condition.bool.AbstractAttributeCapabilities
m_ActualCapabilities, m_Capabilities, m_Invert
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
AdamsInstanceCapabilities()
           
 
Method Summary
 Class[] accepts()
          Returns the class that the consumer accepts.
protected  boolean doEvaluate(AbstractActor owner, Token token)
          Evaluates whether to executed the "then" or "else" branch.
 String globalInfo()
          Returns a string describing the object.
 
Methods inherited from class adams.flow.condition.bool.AbstractAttributeCapabilities
capabilitiesTipText, defineOptions, getCapabilities, getInvert, getQuickInfo, invertTipText, reset, setCapabilities, setInvert, setUp
 
Methods inherited from class adams.flow.condition.bool.AbstractBooleanCondition
evaluate, preEvaluate, shallowCopy, shallowCopy
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdamsInstanceCapabilities

public AdamsInstanceCapabilities()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class 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 BooleanCondition
Specified by:
accepts in class AbstractAttributeCapabilities
Returns:
Unknown

doEvaluate

protected boolean doEvaluate(AbstractActor owner,
                             Token token)
Evaluates whether to executed the "then" or "else" branch.

Specified by:
doEvaluate in class AbstractAttributeCapabilities
Parameters:
owner - the owning IfThenElse actor
token - the current token passing through the IfThenElse actor
Returns:
true if data matches capabilities


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.