Enum Class ScenarioTieRule
- All Implemented Interfaces:
Serializable,Comparable<ScenarioTieRule>,Constable
How a vote resolves when several scenarios finish on the same number of votes and only some of
them fit into the winner count.
Every rule is deterministic in the sense that it always produces a full, valid winner set; only
RANDOM is deliberately non-repeatable.
- Since:
- 1.6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDrop every tied scenario and fill the remaining slots from the next-highest tally.Keep the scenario whose first vote was cast earliest.Run every tied scenario, going over the configured winner count.Prefer the tied scenario with the highest scenario priority, then the lowest ID.Pick between the tied scenarios at random. -
Method Summary
Modifier and TypeMethodDescriptionstatic ScenarioTieRuleReturns the enum constant of this class with the specified name.static ScenarioTieRule[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RANDOM
Pick between the tied scenarios at random. -
PRIORITY
Prefer the tied scenario with the highest scenario priority, then the lowest ID. -
FIRST_VOTE
Keep the scenario whose first vote was cast earliest. -
INCLUDE_ALL
Run every tied scenario, going over the configured winner count. -
EXCLUDE_ALL
Drop every tied scenario and fill the remaining slots from the next-highest tally.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-