mstar
Class RobotAction

java.lang.Object
  |
  +--mstar.RobotAction

public class RobotAction
extends java.lang.Object

This class defines an action for the robot to perform as part of a response to another character in the collaborative environment.

Version:
1.6
Author:
Thaddeus O. Cooper (cooper@tweenproject.org)

Constructor Summary
RobotAction()
          Create an empty action and set the action to be DEFAULT.
RobotAction(java.lang.String response)
          Create an action and set the response to the specified response.
RobotAction(java.lang.String action, java.lang.String response)
          Create an action using the specified action and response.
 
Method Summary
 java.lang.String getAction()
          Gets the action that the robot should use in its response.
 java.lang.String getResponse()
          Gets the response that the robot should send to the user that it is interacting with.
 void setAction(java.lang.String action)
          Sets the action that the robot should use in its response.
 void setResponse(java.lang.String response)
          Sets the response that the robot should send to the user that it is interacting with.
 boolean shouldUseDefaultAction()
          Checks to see if the robot should use the default action instead of a programmer specified action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RobotAction

public RobotAction()
Create an empty action and set the action to be DEFAULT.

RobotAction

public RobotAction(java.lang.String response)
Create an action and set the response to the specified response.
Parameters:
response - the response the robot should send to the user that it is interacting with.

RobotAction

public RobotAction(java.lang.String action,
                   java.lang.String response)
Create an action using the specified action and response.
Parameters:
action - the type of action the robot should use in its response. For example, pose.
response - the response the robot should send to the user that it is interacting with.
Method Detail

setAction

public void setAction(java.lang.String action)
Sets the action that the robot should use in its response. For example, pose.
Parameters:
action - the type of action the robot should use in its response. For example, pose.

getAction

public java.lang.String getAction()
Gets the action that the robot should use in its response. For example, pose.
Returns:
the type of action the robot should use in its response. For example, pose.

setResponse

public void setResponse(java.lang.String response)
Sets the response that the robot should send to the user that it is interacting with.
Parameters:
response - the response the robot should send to the user that it is interacting with.

getResponse

public java.lang.String getResponse()
Gets the response that the robot should send to the user that it is interacting with.
Returns:
the response the robot should send to the user that it is interacting with.

shouldUseDefaultAction

public boolean shouldUseDefaultAction()
Checks to see if the robot should use the default action instead of a programmer specified action. If the getAction routine returns default as its type then the robot should use the default action.
Returns:
true if the robot should use the default action, false otherwise.