org.jscience.politics.vote
Class Voter

java.lang.Object
  extended by org.jscience.sociology.Role
      extended by org.jscience.politics.vote.Voter
All Implemented Interfaces:
Named
Direct Known Subclasses:
MultipleChoicesRandomVoter, SingleChoiceRandomVoter

public abstract class Voter
extends Role

This class represent a person in a voting situation.


Field Summary
 
Fields inherited from class org.jscience.sociology.Role
CLIENT, OBSERVER, SERVER, SUPERVISOR
 
Constructor Summary
Voter(Individual individual, VoteSituation situation)
          Creates a new Voter object.
 
Method Summary
 Ballot getBallotForRoundI(int i)
          DOCUMENT ME!
 java.util.Vector getBallots()
          DOCUMENT ME!
 Ballot getCurrentBallot()
          DOCUMENT ME!
 int getCurrentRoundForVoter()
          DOCUMENT ME!
 int getNumBallots()
          DOCUMENT ME!
 boolean hasVotedAtRoundI(int i)
          DOCUMENT ME!
abstract  void select()
          DOCUMENT ME!
 void setBallotForCurrentRound(Ballot ballot)
          DOCUMENT ME!
protected  void vote()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.sociology.Role
getIndividual, getKind, getName, getSituation, setSituation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Voter

public Voter(Individual individual,
             VoteSituation situation)
Creates a new Voter object.

Parameters:
individual - DOCUMENT ME!
situation - DOCUMENT ME!
Method Detail

getBallotForRoundI

public Ballot getBallotForRoundI(int i)
DOCUMENT ME!

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

getBallots

public java.util.Vector getBallots()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNumBallots

public int getNumBallots()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getCurrentBallot

public Ballot getCurrentBallot()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setBallotForCurrentRound

public void setBallotForCurrentRound(Ballot ballot)
DOCUMENT ME!

Parameters:
ballot - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

hasVotedAtRoundI

public boolean hasVotedAtRoundI(int i)
DOCUMENT ME!

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

getCurrentRoundForVoter

public int getCurrentRoundForVoter()
DOCUMENT ME!

Returns:
DOCUMENT ME!

vote

protected void vote()
DOCUMENT ME!


select

public abstract void select()
DOCUMENT ME!