public class InstantRunoffStrategy extends AbstractVoteCountingStrategy
AbstractVoteCountingStrategy.VoteForChoiceComparator| Modifier and Type | Field and Description |
|---|---|
static int |
ID |
ZERO_D| Constructor and Description |
|---|
InstantRunoffStrategy() |
| Modifier and Type | Method and Description |
|---|---|
List<ChoiceScore> |
applyScores(Map<Voter,List<Set<String>>> topRankChoices,
Set<String> idsToExclude,
Set<String> idsToInclude,
SortedMap<String,ChoiceScore> resultByChoice) |
String |
getDisplayVoteValue(Integer voteValue) |
String |
getI18nHelp() |
String |
getI18nName() |
int |
getId() |
String |
getTotalVoteValueNotValidMessage(Locale locale) |
ChoiceToVoteRenderType |
getVoteValueEditorType() |
String |
getVoteValueNotValidMessage(Locale locale) |
void |
guessChoiceIdsToRemove(Set<String> idsToExclude,
List<ChoiceScore> results) |
boolean |
isChoiceInVote(Integer voteValue) |
boolean |
isDisplayResultsByChoice() |
boolean |
isTotalVoteValueValid(int totalValues) |
boolean |
isVoteValueNull(Integer voteValue) |
boolean |
isVoteValueValid(Integer voteValue) |
void |
round(Map<Voter,List<Set<String>>> topRankChoices,
Set<String> idsToExclude,
Set<String> idsToInclude,
SortedMap<String,ChoiceScore> resultByChoice,
double totalWeight) |
VoteCountingResult |
votecount(Set<Voter> voters) |
buildVoterSortedChoices, getAllChoiceIds, getDirectWinners, getStrategyHelp, getStrategyName, resultToList, sortVoteForChoices, toChoiceScore, votersToResultpublic static final int ID
public int getId()
public String getI18nName()
public String getI18nHelp()
public ChoiceToVoteRenderType getVoteValueEditorType()
public boolean isChoiceInVote(Integer voteValue)
public boolean isVoteValueNull(Integer voteValue)
public boolean isDisplayResultsByChoice()
public boolean isVoteValueValid(Integer voteValue)
public boolean isTotalVoteValueValid(int totalValues)
public VoteCountingResult votecount(Set<Voter> voters)
public void round(Map<Voter,List<Set<String>>> topRankChoices, Set<String> idsToExclude, Set<String> idsToInclude, SortedMap<String,ChoiceScore> resultByChoice, double totalWeight)
public List<ChoiceScore> applyScores(Map<Voter,List<Set<String>>> topRankChoices, Set<String> idsToExclude, Set<String> idsToInclude, SortedMap<String,ChoiceScore> resultByChoice)
public void guessChoiceIdsToRemove(Set<String> idsToExclude, List<ChoiceScore> results)
Copyright © 2009-2012 CodeLutin. All Rights Reserved.