org.jactr.core.production.action
Class DefaultAction

java.lang.Object
  extended by org.jactr.core.production.action.DefaultAction
All Implemented Interfaces:
IAction
Direct Known Subclasses:
AddAction, BindAction, DefaultSlotAction, ExecuteAction, ModifyAction, OutputAction, ScriptableAction, SetAction, StopAction

public abstract class DefaultAction
extends java.lang.Object
implements IAction

DefaultAction is the general base class for all the of the Actions presented (aside, of course, for IAction itself). It provides general implementations of bind(), fire(), and duplicate(). The most important of these is the bind() method which handles all the variable resolution for Actions.


Constructor Summary
DefaultAction()
          Constructor for the DefaultAction object
 
Method Summary
 void dispose()
          Description of the Method
abstract  double fire(IInstantiation instantiation, double firingTime)
          Description of the Method
static java.lang.Object resolve(java.lang.String variableName, java.util.Map<java.lang.String,java.lang.Object> bindings)
          resolve the value of variableName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jactr.core.production.action.IAction
bind
 

Constructor Detail

DefaultAction

public DefaultAction()
Constructor for the DefaultAction object

Method Detail

dispose

public void dispose()
Description of the Method

Specified by:
dispose in interface IAction

fire

public abstract double fire(IInstantiation instantiation,
                            double firingTime)
Description of the Method

Specified by:
fire in interface IAction
Parameters:
instantiation - Description of the Parameter
firingTime - when this production was fired
Returns:
Description of the Return Value

resolve

public static java.lang.Object resolve(java.lang.String variableName,
                                       java.util.Map<java.lang.String,java.lang.Object> bindings)
resolve the value of variableName

Parameters:
variableName - Description of the Parameter
bindings - Description of the Parameter
Returns:
the value of variableName or null if undefined. it the variableName points to a ISlot, the ISlot.getSlotValue() is returned.