edu.cuny.cat.market.accepting
Class SelfBeatingAcceptingPolicy

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.SelfBeatingAcceptingPolicy
All Implemented Interfaces:
AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable

public class SelfBeatingAcceptingPolicy
extends ShoutAcceptingPolicy

An accepting policy with which a new shout must beat its trader's standing shout to be acceptable.

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
SelfBeatingAcceptingPolicy()
           
 
Method Summary
 void check(Shout oldShout, Shout newShout)
          implements the rule that a new shout must improve over its old peer.
 
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

SelfBeatingAcceptingPolicy

public SelfBeatingAcceptingPolicy()
Method Detail

check

public void check(Shout oldShout,
                  Shout newShout)
           throws IllegalShoutException
implements the rule that a new shout must improve over its old peer.

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)