christophedelory.betty.model.rank
Class GeneralLowestResultRankProcessor
java.lang.Object
christophedelory.betty.model.rank.GeneralLowestResultRankProcessor
- All Implemented Interfaces:
- RankProcessor, Comparator<PlayerRank>
public class GeneralLowestResultRankProcessor
- extends Object
- implements RankProcessor, Comparator<PlayerRank>
A rank processor which scope is the full list of players in a phase, and based on the player results.
- Version:
- $Revision$
- Author:
- Christophe Delory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeneralLowestResultRankProcessor
public GeneralLowestResultRankProcessor()
processPhasePlayerRanks
public void processPhasePlayerRanks(LocalPhase dbPhase,
Collection<LocalEvent> dbEvents,
int initialRank,
List<PlayerRank> playerRanksToBeResolved)
throws Exception
- Description copied from interface:
RankProcessor
- In the scope of the specified phase, assigns the ranks to the list of players, starting at
initialRank
.
- Specified by:
processPhasePlayerRanks
in interface RankProcessor
- Parameters:
dbPhase
- a championship's phase. Shall not be null
.dbEvents
- the list of phase's events. Shall not be null
.initialRank
- the associated rank. Should be greater or equal to 1.playerRanksToBeResolved
- a list of player ranks which shall be tuned. Should not be null
.
- Throws:
NullPointerException
- if dbPhase
is null
.
IllegalArgumentException
- if initialRank
is lower than 1.
Exception
- if any unexpected error occurs.
compare
public int compare(PlayerRank o1,
PlayerRank o2)
- Specified by:
compare
in interface Comparator<PlayerRank>
Copyright © 2008-2009 Christophe Delory. All Rights Reserved.