adams.flow.condition.bool
Class AbstractAttributeCapabilities

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
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, ShallowCopySupporter<BooleanCondition>, SizeOfHandler, BooleanCondition, Serializable
Direct Known Subclasses:
AdamsInstanceCapabilities, WekaCapabilities

public abstract class AbstractAttributeCapabilities
extends AbstractBooleanCondition

Ancestor for capabilities-based conditions.

Version:
$Revision: 5660 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
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_DebugLevel, m_OptionManager
 
Constructor Summary
AbstractAttributeCapabilities()
           
 
Method Summary
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(AbstractActor owner, Token token)
          Evaluates whether to executed the "then" or "else" branch.
 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(AbstractActor owner)
          Configures the condition.
 
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, globalInfo, 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
 

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 OptionHandler
Overrides:
defineOptions in class AbstractOptionHandler

reset

protected void reset()
Resets the scheme.

Overrides:
reset in class 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 BooleanCondition
Specified by:
getQuickInfo in class AbstractBooleanCondition
Returns:
always null

accepts

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

Specified by:
accepts in interface BooleanCondition
Specified by:
accepts in class AbstractBooleanCondition
Returns:
Unknown

setUp

public String setUp(AbstractActor owner)
Configures the condition.

Specified by:
setUp in interface BooleanCondition
Overrides:
setUp in class AbstractBooleanCondition
Parameters:
owner - the actor this condition belongs to
Returns:
null if everything is fine, otherwise error message

doEvaluate

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

Specified by:
doEvaluate in class AbstractBooleanCondition
Parameters:
owner - the owning IfThenElse actor
token - the current token passing through the IfThenElse actor
Returns:
always true


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