edu.cuny.cat.market.accepting
Class OnlyNewShoutDecidingAcceptingPolicy

java.lang.Object
  extended by edu.cuny.cat.market.AuctioneerPolicy
      extended by edu.cuny.cat.market.accepting.ShoutAcceptingPolicy
          extended by edu.cuny.cat.market.accepting.OnlyNewShoutDecidingAcceptingPolicy
All Implemented Interfaces:
AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable
Direct Known Subclasses:
AlwaysAcceptingPolicy, HistoryBasedAcceptingPolicy, NeverAcceptingPolicy, QuoteBeatingAcceptingPolicy, StandingAverageBeatingAcceptingPolicy, TransactionBasedAcceptingPolicy

public abstract class OnlyNewShoutDecidingAcceptingPolicy
extends ShoutAcceptingPolicy

The class of accepting policy that makes decision based on the new shout only, having nothing to do with the old (standing) shout.

Version:
$Revision: 1.4 $
Author:
Jinzhong Niu

Field Summary
 
Fields inherited from class edu.cuny.cat.market.accepting.ShoutAcceptingPolicy
P_DEF_BASE
 
Fields inherited from class edu.cuny.cat.market.AuctioneerPolicy
auctioneer
 
Constructor Summary
OnlyNewShoutDecidingAcceptingPolicy()
           
 
Method Summary
abstract  void check(Shout shout)
          checks whether a new shout is acceptable or not.
 void check(Shout oldShout, Shout newShout)
          calls check(Shout) and checks with newShout only.
 
Methods inherited from class edu.cuny.cat.market.AuctioneerPolicy
eventOccurred, getAuctioneer, initialize, reset, setAuctioneer, setup, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OnlyNewShoutDecidingAcceptingPolicy

public OnlyNewShoutDecidingAcceptingPolicy()
Method Detail

check

public abstract void check(Shout shout)
                    throws IllegalShoutException
checks whether a new shout is acceptable or not.

Parameters:
shout - the shout being checked.
Throws:
IllegalShoutException

check

public void check(Shout oldShout,
                  Shout newShout)
           throws IllegalShoutException
calls check(Shout) and checks with newShout only.

Specified by:
check in class ShoutAcceptingPolicy
Parameters:
oldShout - the shout to be replaced; if null, no shout is replaced.
newShout - the new shout to replace the old one
Throws:
IllegalShoutException
See Also:
ShoutAcceptingPolicy.check(edu.cuny.cat.core.Shout, edu.cuny.cat.core.Shout)