org.jactr.core.production.action
Class BindAction

java.lang.Object
  extended by org.jactr.core.production.action.DefaultAction
      extended by org.jactr.core.production.action.BindAction
All Implemented Interfaces:
IAction

public class BindAction
extends DefaultAction

BindAction is used merely for the assignment of variables that are not explicitly imbedded in any other action. The constructor accepts a variableName (?=variableName?) and any value that will be bound to. When the bind action is bound, the variable binding will be added to the Map making it accessible for subsequent Actions to utilize.

Author:
harrison

Field Summary
 java.lang.Object _object
          Description of the Field
 java.lang.String _variableName
          Description of the Field
 
Constructor Summary
BindAction(java.lang.String variableName, java.lang.Object someValue)
          Constructor for the BindAction object
 
Method Summary
 IAction bind(java.util.Map<java.lang.String,java.lang.Object> variableBindings)
          Bind is called during the creation of an instantiation of a produciton.
 double fire(IInstantiation instantiation, double firingTime)
          Description of the Method
 java.lang.Object getObject()
          Gets the object attribute of the BindAction object
 java.lang.String getVariableName()
          Gets the variableName attribute of the BindAction object
 void setObject(java.lang.Object ob)
          Sets the object attribute of the BindAction object
 void setVariableName(java.lang.String name)
          Sets the variableName attribute of the BindAction object
 
Methods inherited from class org.jactr.core.production.action.DefaultAction
dispose, finalize, resolve
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_variableName

public java.lang.String _variableName
Description of the Field


_object

public java.lang.Object _object
Description of the Field

Constructor Detail

BindAction

public BindAction(java.lang.String variableName,
                  java.lang.Object someValue)
Constructor for the BindAction object

Parameters:
variableName - Description of the Parameter
someValue - Description of the Parameter
Method Detail

bind

public IAction bind(java.util.Map<java.lang.String,java.lang.Object> variableBindings)
Description copied from interface: IAction
Bind is called during the creation of an instantiation of a produciton. By the time this gets called, we know that all the conditions are matched and all the variables have been assigned. This method merely creates a copy of this action and applies those bindings. the IAction returned by this method will be the actual one that is fired. Normally, an action should not change the contents of variableBindings

Returns:

getVariableName

public java.lang.String getVariableName()
Gets the variableName attribute of the BindAction object

Returns:
The variableName value

setVariableName

public void setVariableName(java.lang.String name)
Sets the variableName attribute of the BindAction object

Parameters:
name - The new variableName value

getObject

public java.lang.Object getObject()
Gets the object attribute of the BindAction object

Returns:
The object value

setObject

public void setObject(java.lang.Object ob)
Sets the object attribute of the BindAction object

Parameters:
ob - The new object value

fire

public double fire(IInstantiation instantiation,
                   double firingTime)
Description copied from class: DefaultAction
Description of the Method

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