public abstract class AbstractVoteCounting<S extends VoteCountingStrategy> extends Object implements VoteCounting<S>
VoteCounting.| Modifier and Type | Field and Description |
|---|---|
protected String |
i18nHelp
I18n Key for help of this vote counting type.
|
protected String |
i18nName
I18n key for name of this vote counting type.
|
protected String |
i18nShortHelp
I18n Key for short help of this vote counting type.
|
protected int |
id
Unique id of the vote counting type.
|
protected Class<S> |
strategyType
Type of strategy used to vote count.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractVoteCounting(int id,
Class<S> strategyType,
String i18nName,
String i18nShortHelp,
String i18nHelp) |
| Modifier and Type | Method and Description |
|---|---|
String |
getHelp(Locale locale)
Get the vote counting strategy help to display in UI.
|
int |
getId()
Obtains the unique id of this strategy.
|
String |
getName(Locale locale)
Get the vote counting strategy name to display in UI.
|
String |
getShortHelp(Locale locale)
Get the vote counting short help to display in UI.
|
S |
newStrategy()
Obtains a fresh instance of a vote coutning strategy.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDisplayVoteValue, getTotalVoteValueNotValidMessage, getVoteValueEditorType, getVoteValueNotValidMessage, isChoiceInVote, isTotalVoteValueValid, isVoteValueNull, isVoteValueValidprotected final int id
protected final Class<S extends VoteCountingStrategy> strategyType
protected final String i18nName
protected final String i18nShortHelp
protected final String i18nHelp
public final S newStrategy()
VoteCountingnewStrategy in interface VoteCounting<S extends VoteCountingStrategy>public final String getName(Locale locale)
VoteCountinggetName in interface VoteCounting<S extends VoteCountingStrategy>locale - the locale used to render the strategy namepublic final String getShortHelp(Locale locale)
VoteCountinggetShortHelp in interface VoteCounting<S extends VoteCountingStrategy>locale - the locale used to render the strategy namepublic final String getHelp(Locale locale)
VoteCountinggetHelp in interface VoteCounting<S extends VoteCountingStrategy>locale - the locale used to render the strategy namepublic final int getId()
VoteCountinggetId in interface VoteCounting<S extends VoteCountingStrategy>Copyright © 2009-2013 CodeLutin. All Rights Reserved.