Class MajorityVoting

java.lang.Object
com.tnsai.coordination.voting.MajorityVoting

public final class MajorityVoting extends Object
Tallies votes using majority-based methods: MAJORITY, SUPERMAJORITY, UNANIMOUS, and WEIGHTED. This is a pure logic class with no agent dependencies.
  • Method Details

    • tally

      public static VotingResult tally(List<Vote> votes, VotingConfig config)
      Tallies the given votes according to the voting config. Supports MAJORITY, SUPERMAJORITY, UNANIMOUS, and WEIGHTED methods.
      Parameters:
      votes - The votes to tally
      config - The voting configuration
      Returns:
      The voting result