edu.cuny.cat.trader.marketselection
Class StaticMarketSelectionStrategy
java.lang.Object
java.util.Observable
edu.cuny.cat.trader.marketselection.AbstractMarketSelectionStrategy
edu.cuny.cat.trader.marketselection.StaticMarketSelectionStrategy
- All Implemented Interfaces:
- edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable
public class StaticMarketSelectionStrategy
- extends AbstractMarketSelectionStrategy
A market selection strategy that always chooses a particular specialist to
register with.
Parameters
base.specialist
string |
(the name of the specialist to choose always) |
- Version:
- $Revision: 1.6 $
- Author:
- Jinzhong Niu
Method Summary |
java.lang.String |
getSpecialistId()
|
void |
selectMarket()
always select the pre-specified specialist if it is active or none
otherwise. |
void |
setSpecialistId(java.lang.String specialistId)
|
void |
setup(edu.cuny.config.param.ParameterDatabase parameters,
edu.cuny.config.param.Parameter base)
|
protected void |
setupMarkets(java.util.Collection<Specialist> marketColl)
initiates specialists traders may register with in the game. |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
P_SPECIALIST
public static final java.lang.String P_SPECIALIST
- See Also:
- Constant Field Values
specialistId
protected java.lang.String specialistId
specialistIndex
protected java.lang.Integer specialistIndex
StaticMarketSelectionStrategy
public StaticMarketSelectionStrategy()
setup
public void setup(edu.cuny.config.param.ParameterDatabase parameters,
edu.cuny.config.param.Parameter base)
- Specified by:
setup
in interface edu.cuny.config.param.Parameterizable
- Overrides:
setup
in class AbstractMarketSelectionStrategy
setupMarkets
protected void setupMarkets(java.util.Collection<Specialist> marketColl)
- Description copied from class:
AbstractMarketSelectionStrategy
- initiates specialists traders may register with in the game.
- Overrides:
setupMarkets
in class AbstractMarketSelectionStrategy
- Parameters:
marketColl
- the collection of specialists participating in the game
setSpecialistId
public void setSpecialistId(java.lang.String specialistId)
getSpecialistId
public java.lang.String getSpecialistId()
selectMarket
public void selectMarket()
- always select the pre-specified specialist if it is active or none
otherwise.
- Specified by:
selectMarket
in class AbstractMarketSelectionStrategy