edu.cuny.cat.market.accepting
Class LooserCombiAcceptingPolicy

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.CombiAcceptingPolicy
              extended by edu.cuny.cat.market.accepting.LooserCombiAcceptingPolicy
All Implemented Interfaces:
AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable

public class LooserCombiAcceptingPolicy
extends CombiAcceptingPolicy

A compound accepting policy that will accept a shout as long as one of its sub accepting policies accept the shout.

Version:
$Revision: 1.4 $
Author:
Jinzhong Niu

Field Summary
 
Fields inherited from class edu.cuny.cat.market.accepting.CombiAcceptingPolicy
P_DEF_BASE, P_NUM, policies
 
Fields inherited from class edu.cuny.cat.market.AuctioneerPolicy
auctioneer
 
Constructor Summary
LooserCombiAcceptingPolicy()
           
 
Method Summary
 void check(Shout oldShout, Shout newShout)
          checks whether newShout is acceptable or not to replace oldShout.
 
Methods inherited from class edu.cuny.cat.market.accepting.CombiAcceptingPolicy
addPolicy, eventOccurred, getPolicy, policyIterator, reset, setAuctioneer, setup, toString
 
Methods inherited from class edu.cuny.cat.market.AuctioneerPolicy
getAuctioneer, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LooserCombiAcceptingPolicy

public LooserCombiAcceptingPolicy()
Method Detail

check

public void check(Shout oldShout,
                  Shout newShout)
           throws IllegalShoutException
Description copied from class: ShoutAcceptingPolicy
checks whether newShout is acceptable or not to replace oldShout. If not, an IllegalShoutException is thrown.

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