edu.cuny.cat.trader.strategy
Class TruthTellingStrategy

java.lang.Object
  extended by java.util.Observable
      extended by edu.cuny.cat.trader.strategy.AbstractStrategy
          extended by edu.cuny.cat.trader.strategy.FixedQuantityStrategyImpl
              extended by edu.cuny.cat.trader.strategy.TruthTellingStrategy
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

public class TruthTellingStrategy
extends FixedQuantityStrategyImpl
implements java.io.Serializable

A trading strategy that always bids at its private value.

Version:
$Revision: 1.8 $
Author:
Steve Phelps
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.cuny.cat.trader.strategy.FixedQuantityStrategyImpl
P_DEF_BASE, quantity
 
Fields inherited from class edu.cuny.cat.trader.strategy.AbstractStrategy
agent, currentShout, MIN_PRICE_DIFFERENCE
 
Constructor Summary
TruthTellingStrategy()
           
TruthTellingStrategy(AbstractTradingAgent agent)
           
 
Method Summary
 boolean modifyShout(Shout.MutableShout shout)
          Modify the price and quantity of the given shout according to this strategy.
 
Methods inherited from class edu.cuny.cat.trader.strategy.FixedQuantityStrategyImpl
determineQuantity, getQuantity, setQuantity, setup, toString
 
Methods inherited from class edu.cuny.cat.trader.strategy.AbstractStrategy
eventOccurred, getAgent, initialize, modifyShout, protoClone, requiresAuctionHistory, reset, setAgent
 
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.cat.trader.strategy.Strategy
modifyShout, requiresAuctionHistory, setAgent
 
Methods inherited from interface edu.cuny.obj.Prototypeable
protoClone
 
Methods inherited from interface edu.cuny.obj.Resetable
reset
 
Methods inherited from interface edu.cuny.cat.event.AuctionEventListener
eventOccurred
 

Constructor Detail

TruthTellingStrategy

public TruthTellingStrategy(AbstractTradingAgent agent)

TruthTellingStrategy

public TruthTellingStrategy()
Method Detail

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 FixedQuantityStrategyImpl
Returns:
false if no shout is to be placed at this time