Package com.tnsai.coordination.voting
Class MajorityVoting
java.lang.Object
com.tnsai.coordination.voting.MajorityVoting
Tallies votes using majority-based methods: MAJORITY, SUPERMAJORITY, UNANIMOUS, and WEIGHTED.
This is a pure logic class with no agent dependencies.
-
Method Summary
Modifier and TypeMethodDescriptionstatic VotingResulttally(List<Vote> votes, VotingConfig config) Tallies the given votes according to the voting config.
-
Method Details
-
tally
Tallies the given votes according to the voting config. Supports MAJORITY, SUPERMAJORITY, UNANIMOUS, and WEIGHTED methods.- Parameters:
votes- The votes to tallyconfig- The voting configuration- Returns:
- The voting result
-