Enum Class VotingMethod

java.lang.Object
java.lang.Enum<VotingMethod>
com.tnsai.coordination.voting.VotingMethod
All Implemented Interfaces:
Serializable, Comparable<VotingMethod>, Constable

public enum VotingMethod extends Enum<VotingMethod>
Available voting methods for consensus building.
  • Enum Constant Details

    • MAJORITY

      public static final VotingMethod MAJORITY
      Simple majority (more than 50%)
    • SUPERMAJORITY

      public static final VotingMethod SUPERMAJORITY
      More than supermajority threshold (default 2/3)
    • UNANIMOUS

      public static final VotingMethod UNANIMOUS
      All voters must agree
    • RANKED_CHOICE

      public static final VotingMethod RANKED_CHOICE
      Instant-runoff voting with ranked preferences
    • WEIGHTED

      public static final VotingMethod WEIGHTED
      Weighted by voter weight
  • Method Details

    • values

      public static VotingMethod[] 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

      public static VotingMethod valueOf(String name)
      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 name
      NullPointerException - if the argument is null