Class Voter

java.lang.Object
org.episteme.social.sociology.Role
org.episteme.social.politics.Voter
All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named, Temporal<TimeCoordinate>

public class Voter extends Role
Represents a person participating in a voting process. A voter manages their ballots across multiple rounds of voting. * @version 2.0
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • Voter

      public Voter(Individual individual, Election election)
      Creates a new Voter role.
      Parameters:
      individual - the individual casting votes
      election - the context of the vote
  • Method Details

    • getBallotForRoundI

      public Ballot getBallotForRoundI(int i)
      Retrieves the ballot cast at a specific round.
      Parameters:
      i - the round number (1-indexed)
      Returns:
      the cast ballot
    • getBallots

      public List<Ballot> getBallots()
      Returns the list of all ballots cast by this voter.
      Returns:
      the list of ballots
    • getCurrentBallot

      public Ballot getCurrentBallot()
      Retrieves the most recent ballot.
      Returns:
      the current ballot
    • castBallot

      public void castBallot(Ballot ballot)
      Casts a ballot for the current round.
      Parameters:
      ballot - the ballot to cast
    • hasVotedAtRoundI

      public boolean hasVotedAtRoundI(int i)
      Checks if the voter has cast their vote in a specific round.
      Parameters:
      i - the round number (1-indexed)
      Returns:
      true if they voted
    • getCurrentRoundForVoter

      public int getCurrentRoundForVoter()
      Returns the current round number according to this voter's activity.
      Returns:
      current round count