edu.memphis.ccrg.lida.actionselection
Class ActionImpl

java.lang.Object
  extended by edu.memphis.ccrg.lida.actionselection.ActionImpl
All Implemented Interfaces:
Action, Initializable

public class ActionImpl
extends java.lang.Object
implements Action

Default implementation of Action

Author:
Ryan McCall, Javier Snaider

Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.memphis.ccrg.lida.actionselection.Action
Action.Topology
 
Constructor Summary
ActionImpl()
          Default constructor
ActionImpl(java.lang.String label)
          Convenience constructor that set the Action's label
 
Method Summary
 int getId()
           
 java.lang.String getLabel()
           
 java.lang.Object getParam(java.lang.String name, java.lang.Object defaultValue)
          A convenience method to read parameters from the Map of properties set with the init() method.
 void init()
          This is a convenience method to initialize this Object.
 void init(java.util.Map<java.lang.String,?> parameters)
          This method initializes the module with parameters specified in agent.xml
 void setLabel(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionImpl

public ActionImpl()
Default constructor


ActionImpl

public ActionImpl(java.lang.String label)
Convenience constructor that set the Action's label

Parameters:
label - the label to set
Method Detail

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface Action
Returns:
the action label.

setLabel

public void setLabel(java.lang.String name)
Specified by:
setLabel in interface Action
Parameters:
name - the action label to set.

getId

public int getId()
Specified by:
getId in interface Action
Returns:
the Action id

getParam

public java.lang.Object getParam(java.lang.String name,
                                 java.lang.Object defaultValue)
Description copied from interface: Initializable
A convenience method to read parameters from the Map of properties set with the init() method.

Specified by:
getParam in interface Initializable
Parameters:
name - the parameter name
defaultValue - the default value to be returned if the parameter doesn't exist.
Returns:
the value of the parameter or the default value.

init

public void init(java.util.Map<java.lang.String,?> parameters)
Description copied from interface: Initializable
This method initializes the module with parameters specified in agent.xml

Specified by:
init in interface Initializable
Parameters:
parameters - Map of parameters indexed by String names

init

public void init()
Description copied from interface: Initializable
This is a convenience method to initialize this Object. It is called from init(Map parameters). Subclasses can overwrite this method in order to initialize this Object. But make sure to call super.init(); at the beginning of the implementation of this method.

Specified by:
init in interface Initializable