edu.memphis.ccrg.lida.framework.initialization
Class StrategyDef

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.initialization.StrategyDef

public class StrategyDef
extends java.lang.Object

Definition of a Strategy object.

Author:
Javier Snaider
See Also:
AgentXmlFactory

Constructor Summary
StrategyDef()
          Default constructor
StrategyDef(java.lang.String className, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String type, boolean flyWeight)
           
 
Method Summary
 java.lang.String getClassName()
           
 Strategy getInstance()
          if this strategy is flyweight returns the only one instance, a new instance otherwise.
 java.lang.String getName()
           
 java.util.Map<java.lang.String,java.lang.Object> getParams()
           
 java.lang.String getType()
           
 boolean isFlyWeight()
           
 void setClassName(java.lang.String className)
           
 void setFlyWeight(boolean flyWeight)
           
 void setName(java.lang.String name)
           
 void setParams(java.util.Map<java.lang.String,java.lang.Object> params)
           
 void setType(java.lang.String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrategyDef

public StrategyDef(java.lang.String className,
                   java.lang.String name,
                   java.util.Map<java.lang.String,java.lang.Object> params,
                   java.lang.String type,
                   boolean flyWeight)
Parameters:
className - Qualified name
name - Strategy name
params - optional parameters
type - kind of strategy, e.g. decay, excite
flyWeight - Will there be multiple copies of this strategy or just one shared?

StrategyDef

public StrategyDef()
Default constructor

Method Detail

getInstance

public Strategy getInstance()
if this strategy is flyweight returns the only one instance, a new instance otherwise.

Returns:
the instance

isFlyWeight

public boolean isFlyWeight()
Returns:
the flyWeight

setFlyWeight

public void setFlyWeight(boolean flyWeight)
Parameters:
flyWeight - the flyWeight to set

getName

public java.lang.String getName()
Returns:
the name

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getClassName

public java.lang.String getClassName()
Returns:
the className

setClassName

public void setClassName(java.lang.String className)
Parameters:
className - the className to set

getType

public java.lang.String getType()
Returns:
the type

setType

public void setType(java.lang.String type)
Parameters:
type - the type to set

getParams

public java.util.Map<java.lang.String,java.lang.Object> getParams()
Returns:
the params

setParams

public void setParams(java.util.Map<java.lang.String,java.lang.Object> params)
Parameters:
params - the params to set