edu.cuny.cat.market.charging
Class SerialChargingPolicy

java.lang.Object
  extended by edu.cuny.cat.market.AuctioneerPolicy
      extended by edu.cuny.cat.market.charging.ChargingPolicy
          extended by edu.cuny.cat.market.charging.CombiChargingPolicy
              extended by edu.cuny.cat.market.charging.SerialChargingPolicy
All Implemented Interfaces:
AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable

public class SerialChargingPolicy
extends CombiChargingPolicy

A charging policy that divides the duration of a game into several phases and use one of its child charging policies during each phase.

Parameters

base.i
int
(the parameter base of the ith phase)
base.i.start
int
(the start day of the ith phase (inclusive))
base.i.end
int
(the end day of the ith phase (inclusive))

Version:
$Revision: 1.23 $
Author:
Jinzhong Niu

Field Summary
static java.lang.String P_END
           
static java.lang.String P_START
           
protected  edu.cuny.cat.market.charging.SerialChargingPolicy.ChargingPhase[] phases
           
 
Fields inherited from class edu.cuny.cat.market.charging.CombiChargingPolicy
P_NUM, policies
 
Fields inherited from class edu.cuny.cat.market.charging.ChargingPolicy
FEE_TYPES, fees, FLAT, FRACTIONAL, INFORMATION_INDEX, MAXES, MINES, P_DEF_BASE, P_FEES, PROFIT_INDEX, REGISTRATION_INDEX, SHOUT_INDEX, TRANSACTION_INDEX
 
Fields inherited from class edu.cuny.cat.market.AuctioneerPolicy
auctioneer
 
Constructor Summary
SerialChargingPolicy()
           
 
Method Summary
 void eventOccurred(AuctionEvent event)
           
protected  int findPhase(int day)
           
 void setup(edu.cuny.config.param.ParameterDatabase parameters, edu.cuny.config.param.Parameter base)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.cuny.cat.market.charging.CombiChargingPolicy
reset
 
Methods inherited from class edu.cuny.cat.market.charging.ChargingPolicy
adjustFees, getFees, getInformationFee, getProfitFee, getRegistrationFee, getShoutFee, getTransactionFee
 
Methods inherited from class edu.cuny.cat.market.AuctioneerPolicy
getAuctioneer, initialize, setAuctioneer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

P_START

public static final java.lang.String P_START
See Also:
Constant Field Values

P_END

public static final java.lang.String P_END
See Also:
Constant Field Values

phases

protected edu.cuny.cat.market.charging.SerialChargingPolicy.ChargingPhase[] phases
Constructor Detail

SerialChargingPolicy

public SerialChargingPolicy()
Method Detail

setup

public void setup(edu.cuny.config.param.ParameterDatabase parameters,
                  edu.cuny.config.param.Parameter base)
Specified by:
setup in interface edu.cuny.config.param.Parameterizable
Overrides:
setup in class CombiChargingPolicy

eventOccurred

public void eventOccurred(AuctionEvent event)
Specified by:
eventOccurred in interface AuctionEventListener
Overrides:
eventOccurred in class AuctioneerPolicy

findPhase

protected int findPhase(int day)

toString

public java.lang.String toString()
Overrides:
toString in class CombiChargingPolicy