edu.memphis.ccrg.lida.framework.strategies
Class StrategyImpl

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.strategies.StrategyImpl
All Implemented Interfaces:
Initializable, Strategy, java.io.Serializable
Direct Known Subclasses:
BasicSchemeActivationStrategy, DefaultTotalActivationStrategy, LinearDecayStrategy, LinearExciteStrategy, NoDecayStrategy, NoExciteStrategy, SigmoidDecayStrategy, SigmoidExciteStrategy, UpscalePropagationStrategy

public abstract class StrategyImpl
extends java.lang.Object
implements Strategy

Abstract implementation of Strategy

Author:
Javier Snaider
See Also:
Serialized Form

Constructor Summary
StrategyImpl()
           
 
Method Summary
 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,?> params)
          This method initializes the module with parameters specified in agent.xml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrategyImpl

public StrategyImpl()
Method Detail

init

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

Specified by:
init in interface Initializable
Parameters:
params - 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

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.