public abstract class AbstractVoteCountingStrategy extends Object implements VoteCountingStrategy
VoteCountingStrategy.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractVoteCountingStrategy.VoteForChoiceComparator |
| Modifier and Type | Field and Description |
|---|---|
static BigDecimal |
ZERO_D |
| Constructor and Description |
|---|
AbstractVoteCountingStrategy() |
| Modifier and Type | Method and Description |
|---|---|
Map<Voter,List<Set<String>>> |
buildVoterSortedChoices(Set<Voter> voters) |
Set<String> |
getAllChoiceIds(Set<Voter> voters) |
Set<String> |
getDirectWinners(Collection<List<Set<String>>> values) |
String |
getStrategyHelp(Locale locale)
Get the vote counting strategy help to display in UI.
|
String |
getStrategyName(Locale locale)
Get the vote counting strategy name to display in UI.
|
VoteCountingResult |
resultToList(Map<String,ChoiceScore> resultByChoice) |
List<Set<String>> |
sortVoteForChoices(Set<VoteForChoice> voteForChoices,
Comparator<VoteForChoice> comparator) |
List<ChoiceScore> |
toChoiceScore(Map<String,ChoiceScore> resultByChoice) |
SortedMap<String,ChoiceScore> |
votersToResult(Set<Voter> voters) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDisplayVoteValue, getI18nHelp, getI18nName, getId, getTotalVoteValueNotValidMessage, getVoteValueEditorType, getVoteValueNotValidMessage, isChoiceInVote, isDisplayResultsByChoice, isTotalVoteValueValid, isVoteValueNull, isVoteValueValid, votecountpublic static final BigDecimal ZERO_D
public String getStrategyName(Locale locale)
VoteCountingStrategygetStrategyName in interface VoteCountingStrategylocale - the locale used to render the strategy namepublic String getStrategyHelp(Locale locale)
VoteCountingStrategygetStrategyHelp in interface VoteCountingStrategylocale - the locale used to render the strategy namepublic SortedMap<String,ChoiceScore> votersToResult(Set<Voter> voters)
public VoteCountingResult resultToList(Map<String,ChoiceScore> resultByChoice)
public List<ChoiceScore> toChoiceScore(Map<String,ChoiceScore> resultByChoice)
public Map<Voter,List<Set<String>>> buildVoterSortedChoices(Set<Voter> voters)
public List<Set<String>> sortVoteForChoices(Set<VoteForChoice> voteForChoices, Comparator<VoteForChoice> comparator)
Copyright © 2009-2012 CodeLutin. All Rights Reserved.