edu.cuny.cat.trader.strategy
Class FixedQuantityStrategyImpl
java.lang.Object
java.util.Observable
edu.cuny.cat.trader.strategy.AbstractStrategy
edu.cuny.cat.trader.strategy.FixedQuantityStrategyImpl
- All Implemented Interfaces:
- AuctionEventListener, FixedQuantityStrategy, Strategy, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Prototypeable, edu.cuny.obj.Resetable, java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- AdaptiveStrategyImpl, GDStrategy, PureSimpleStrategy, RandomConstrainedStrategy, TruthTellingStrategy
public abstract class FixedQuantityStrategyImpl
- extends AbstractStrategy
- implements FixedQuantityStrategy, edu.cuny.config.param.Parameterizable, java.io.Serializable
An abstract implementation of FixedQuantityStrategy.
Parameters
base.quantity
int >= 0 |
(the quantity to bid for in each shout) |
Default Base
- Version:
- $Revision: 1.13 $
- Author:
- Steve Phelps
- See Also:
- Serialized Form
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 |
Methods inherited from interface edu.cuny.obj.Prototypeable |
protoClone |
Methods inherited from interface edu.cuny.obj.Resetable |
reset |
quantity
protected int quantity
P_DEF_BASE
public static final java.lang.String P_DEF_BASE
- See Also:
- Constant Field Values
FixedQuantityStrategyImpl
public FixedQuantityStrategyImpl()
FixedQuantityStrategyImpl
public FixedQuantityStrategyImpl(AbstractTradingAgent agent)
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
setQuantity
public void setQuantity(int quantity)
- Description copied from interface:
FixedQuantityStrategy
- Specify the quantity to bid for.
- Specified by:
setQuantity
in interface FixedQuantityStrategy
getQuantity
public int getQuantity()
determineQuantity
public int determineQuantity()
- Specified by:
determineQuantity
in interface Strategy
modifyShout
public boolean modifyShout(Shout.MutableShout shout)
- Description copied from class:
AbstractStrategy
- Modify the price and quantity of the given shout according to this
strategy.
- Overrides:
modifyShout
in class AbstractStrategy
- Returns:
- false if no shout is to be placed at this time
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractStrategy