edu.iastate.jrelm.core
Class SimpleAction<O>

java.lang.Object
  extended by edu.iastate.jrelm.core.SimpleAction<O>
Type Parameters:
O - - the type of object being use to represent a course of action. Note, this is different from the Action interface where the type parameter specificies the type of identifier being used. SimpleAction implements Action, specifying the identifier type as Integer.
All Implemented Interfaces:
Action<java.lang.Integer>
Direct Known Subclasses:
BanditAction

public class SimpleAction<O>
extends java.lang.Object
implements Action<java.lang.Integer>

Simple class that implements the Action interface. It acts as a wrapper around a given object specifying or containing information required for an operation the agent may peform in the simulation environment. In other words, the object represents a course of action in the world and SimpleAction acts as a wrapper to make it compatible with other JReLM components.


Constructor Summary
SimpleAction(java.lang.Integer id, O activity)
          Make a SimpleAction, given the action representation Object and an ID.
 
Method Summary
 O getAct()
          Retrieve the object this is an Action wrapper for.
 java.lang.Integer getID()
          Retrieve the ID for this action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAction

public SimpleAction(java.lang.Integer id,
                    O activity)
Make a SimpleAction, given the action representation Object and an ID.

Parameters:
id - - identifier for this action
activity - - object representing an action or operation an agent can perform in the simulation model.
Method Detail

getAct

public O getAct()
Retrieve the object this is an Action wrapper for.

Returns:
- course of action

getID

public java.lang.Integer getID()
Retrieve the ID for this action

Specified by:
getID in interface Action<java.lang.Integer>
Returns:
action identifier