christophedelory.betty.model.bet
Class AbstractBetModel
java.lang.Object
christophedelory.betty.model.bet.AbstractBetModel
- All Implemented Interfaces:
- BetModel, Model
- Direct Known Subclasses:
- RankBetModel, VersusBetModel
public abstract class AbstractBetModel
- extends Object
- implements BetModel
The base implementation of a bet processing model.
- Version:
- $Revision$
- Author:
- Christophe Delory
Method Summary |
int |
getNbBets()
Returns the number of bets expected per event. |
void |
setParameters(List<PropertyDetails> params)
Initializes this processing model with the specified list of configuration parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractBetModel
public AbstractBetModel()
setParameters
public void setParameters(List<PropertyDetails> params)
throws Exception
- Description copied from interface:
Model
- Initializes this processing model with the specified list of configuration parameters.
- Specified by:
setParameters
in interface Model
- Parameters:
params
- a list of configuration parameters. May be empty but not null
.
- Throws:
NullPointerException
- if params
is null
.
Exception
- if any unexpected error occurs.
getNbBets
public int getNbBets()
- Description copied from interface:
BetModel
- Returns the number of bets expected per event.
It cannot be lower than 1, and cannot exceed the number of players involved in the event.
A better may bet either n times (n being this number), or not at all (0 times).
Defaults to 1.
- Specified by:
getNbBets
in interface BetModel
- Returns:
- the expected number of bets per event. Shall not be lower than 1.
Copyright © 2008-2009 Christophe Delory. All Rights Reserved.