simulations.core.strategy
Class Strategy

java.lang.Object
  extended by simulations.core.strategy.Strategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
AskingStrategy, AttackStrategy, CompleteStrategy, DecisionSupportStrategy

public abstract class Strategy
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

This class is an abstract description of a strategy. It just define a name and a random.

See Also:
Serialized Form

Field Summary
protected  java.lang.String abr
          The abrevation of the strat
protected  int memory
          The memory
protected  java.lang.String name
          The strategy's name
protected  java.util.Random randomGenerator
          The random generator
 
Constructor Summary
Strategy()
          Creates a new instance of Strategy
Strategy(int seed)
          Creates a new instance of Strategy
 
Method Summary
 boolean equals(java.lang.Object o)
          Overload of equals method
 java.lang.String getAbr()
          Getter for property abr.
abstract  java.lang.String getDescription()
          Return the description of the strategy
 int getMemory()
          Getter for property memory.
 java.lang.String getName()
          Getter for property name.
 java.util.Random getRandomGenerator()
          Getter for property randomGenerator.
 void setAbr(java.lang.String abr)
          Setter for property abr.
 void setMemory(int memory)
          Setter for property memory.
 void setName(java.lang.String name)
          Setter for property name.
 void setRandomGenerator(java.util.Random randomGenerator)
          Setter for property randomGenerator.
 java.lang.String toString()
          Overload of toString() method This method return the name of the strategy
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

randomGenerator

protected java.util.Random randomGenerator
The random generator


name

protected java.lang.String name
The strategy's name


memory

protected int memory
The memory


abr

protected java.lang.String abr
The abrevation of the strat

Constructor Detail

Strategy

public Strategy()
Creates a new instance of Strategy


Strategy

public Strategy(int seed)
Creates a new instance of Strategy

Parameters:
seed - The seed for the random
Method Detail

getDescription

public abstract java.lang.String getDescription()
Return the description of the strategy

Returns:
Return the description of the strategy

getRandomGenerator

public java.util.Random getRandomGenerator()
Getter for property randomGenerator.

Returns:
Value of property randomGenerator.

setRandomGenerator

public void setRandomGenerator(java.util.Random randomGenerator)
Setter for property randomGenerator.

Parameters:
randomGenerator - New value of property randomGenerator.

getName

public java.lang.String getName()
Getter for property name.

Returns:
Value of property name.

setName

public void setName(java.lang.String name)
Setter for property name.

Parameters:
name - New value of property name.

toString

public java.lang.String toString()
Overload of toString() method This method return the name of the strategy

Overrides:
toString in class java.lang.Object
Returns:
return the name of the strategy

equals

public boolean equals(java.lang.Object o)
Overload of equals method

Overrides:
equals in class java.lang.Object
Parameters:
o - The object to compare
Returns:
Return true if this is equals to o false otherwise

getMemory

public int getMemory()
Getter for property memory.

Returns:
Value of property memory.

setMemory

public void setMemory(int memory)
Setter for property memory.

Parameters:
memory - New value of property memory.

getAbr

public java.lang.String getAbr()
Getter for property abr.

Returns:
Value of property abr.

setAbr

public void setAbr(java.lang.String abr)
Setter for property abr.

Parameters:
abr - New value of property abr.