edu.cuny.cat.market.accepting
Class ShoutAcceptingPolicy

java.lang.Object
  extended by edu.cuny.cat.market.AuctioneerPolicy
      extended by edu.cuny.cat.market.accepting.ShoutAcceptingPolicy
All Implemented Interfaces:
AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable
Direct Known Subclasses:
CombiAcceptingPolicy, OnlyNewShoutDecidingAcceptingPolicy, SelfBeatingAcceptingPolicy

public abstract class ShoutAcceptingPolicy
extends AuctioneerPolicy

A shout-accepting policy determines whether a shout should be accepted or not.

Default Base

accepting

Version:
$Revision: 1.16 $
Author:
Jinzhong Niu

Field Summary
static java.lang.String P_DEF_BASE
           
 
Fields inherited from class edu.cuny.cat.market.AuctioneerPolicy
auctioneer
 
Constructor Summary
ShoutAcceptingPolicy()
           
 
Method Summary
abstract  void check(Shout oldShout, Shout newShout)
          checks whether newShout is acceptable or not to replace oldShout.
 
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
 

Field Detail

P_DEF_BASE

public static final java.lang.String P_DEF_BASE
See Also:
Constant Field Values
Constructor Detail

ShoutAcceptingPolicy

public ShoutAcceptingPolicy()
Method Detail

check

public abstract void check(Shout oldShout,
                           Shout newShout)
                    throws IllegalShoutException
checks whether newShout is acceptable or not to replace oldShout. If not, an IllegalShoutException is thrown.

Parameters:
oldShout - the shout to be replaced; if null, no shout is replaced.
newShout - the new shout to replace the old one
Throws:
IllegalShoutException