net.sourceforge.jasa.market.rules
Class MaxRoundsAuctionClosingCondition

java.lang.Object
  extended by net.sourceforge.jasa.market.rules.TimingCondition
      extended by net.sourceforge.jasa.market.rules.MaxRoundsAuctionClosingCondition
All Implemented Interfaces:
AuctionClosingCondition

public class MaxRoundsAuctionClosingCondition
extends TimingCondition
implements AuctionClosingCondition

The interface for expressing the condition of closing an market.

 

Field Summary
protected  int maximumRounds
          The maximum number of rounds in the market.
 
Fields inherited from interface net.sourceforge.jasa.market.rules.AuctionClosingCondition
P_DEF_BASE
 
Constructor Summary
MaxRoundsAuctionClosingCondition()
           
MaxRoundsAuctionClosingCondition(Market auction)
           
 
Method Summary
 boolean eval()
           
 int getMaximumRounds()
          Return the maximum number of rounds for this market.
 int getRemainingRounds()
           
 void setMaximumRounds(int maximumRounds)
          Set the maximum number of rounds for this market.
 
Methods inherited from class net.sourceforge.jasa.market.rules.TimingCondition
getAuction, setAuction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maximumRounds

protected int maximumRounds
The maximum number of rounds in the market. Ignored if negative.

Constructor Detail

MaxRoundsAuctionClosingCondition

public MaxRoundsAuctionClosingCondition()

MaxRoundsAuctionClosingCondition

public MaxRoundsAuctionClosingCondition(Market auction)
Method Detail

getMaximumRounds

public int getMaximumRounds()
Return the maximum number of rounds for this market.


setMaximumRounds

public void setMaximumRounds(int maximumRounds)
Set the maximum number of rounds for this market. The market will automatically close after this number of rounds has been dealt.


eval

public boolean eval()
Specified by:
eval in class TimingCondition

getRemainingRounds

public int getRemainingRounds()