org.jactr.core.production.action
Class OutputAction

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

public class OutputAction
extends DefaultAction

Description of the Class

Author:
harrison

Field Summary
 java.lang.String _outputTemplate
          Description of the Field
 
Constructor Summary
OutputAction()
          Constructor for the OutputAction object
OutputAction(java.lang.String output)
          Constructor for the OutputAction object
 
Method Summary
 IAction bind(java.util.Map<java.lang.String,java.lang.Object> bindings)
          Bind is called during the creation of an instantiation of a produciton.
 double fire(IInstantiation instantiation, double firingTime)
          Description of the Method
 java.lang.String getText()
          Gets the text attribute of the OutputAction object
static java.lang.String replaceVariables(java.lang.String template, java.util.Map<java.lang.String,java.lang.Object> variableBindings)
          Description of the Method
 void setText(java.lang.String text)
          Sets the text attribute of the OutputAction object
 
Methods inherited from class org.jactr.core.production.action.DefaultAction
dispose, resolve
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_outputTemplate

public java.lang.String _outputTemplate
Description of the Field

Constructor Detail

OutputAction

public OutputAction()
Constructor for the OutputAction object


OutputAction

public OutputAction(java.lang.String output)
Constructor for the OutputAction object

Parameters:
output - Description of the Parameter
Method Detail

setText

public void setText(java.lang.String text)
Sets the text attribute of the OutputAction object

Parameters:
text - The new text value

getText

public java.lang.String getText()
Gets the text attribute of the OutputAction object

Returns:
The text value

bind

public IAction bind(java.util.Map<java.lang.String,java.lang.Object> bindings)
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:

fire

public double fire(IInstantiation instantiation,
                   double firingTime)
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

replaceVariables

public static java.lang.String replaceVariables(java.lang.String template,
                                                java.util.Map<java.lang.String,java.lang.Object> variableBindings)
Description of the Method

Parameters:
variableBindings - Description of the Parameter
Returns:
Description of the Return Value