org.jscience.politics.vote
Class VoteSituation

java.lang.Object
  extended by org.jscience.sociology.Situation
      extended by org.jscience.politics.vote.VoteSituation
All Implemented Interfaces:
Commented, Named

public abstract class VoteSituation
extends Situation

This class represent a person in a voting situation. This class represents all the information and process to collectively choose something by people (ie: vote).


Constructor Summary
VoteSituation(java.lang.String name, java.lang.String comments)
          Creates a new VoteSituation object.
 
Method Summary
 void addMultipleChoicesRandomVoter(Individual individual)
          DOCUMENT ME!
 void addSingleChoiceRandomVoter(Individual individual)
          DOCUMENT ME!
 void closeRound()
          DOCUMENT ME!
 Ballot getBallotForRoundI(int i)
          DOCUMENT ME!
 java.util.Vector getBallots()
          DOCUMENT ME!
 Ballot getCurrentBallot()
          DOCUMENT ME!
 int getCurrentRoundNumber()
          DOCUMENT ME!
 boolean getVotedStatus(Voter voter)
          DOCUMENT ME!
 java.util.Set getVoters()
          DOCUMENT ME!
 boolean isRoundClosed()
          DOCUMENT ME!
 boolean processResult(BallotsProcessor method, int round)
          DOCUMENT ME!
 void setBallotForRoundI(Ballot ballot)
          DOCUMENT ME!
 void vote(Voter voter)
          DOCUMENT ME!
 
Methods inherited from class org.jscience.sociology.Situation
addRole, addRole, getComments, getIndividuals, getName, getRoles, removeRole, setRoles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VoteSituation

public VoteSituation(java.lang.String name,
                     java.lang.String comments)
Creates a new VoteSituation object.

Parameters:
name - DOCUMENT ME!
comments - DOCUMENT ME!
Method Detail

addSingleChoiceRandomVoter

public void addSingleChoiceRandomVoter(Individual individual)
DOCUMENT ME!

Parameters:
individual - DOCUMENT ME!

addMultipleChoicesRandomVoter

public void addMultipleChoicesRandomVoter(Individual individual)
DOCUMENT ME!

Parameters:
individual - DOCUMENT ME!

setBallotForRoundI

public void setBallotForRoundI(Ballot ballot)
DOCUMENT ME!

Parameters:
ballot - DOCUMENT ME!

getCurrentRoundNumber

public int getCurrentRoundNumber()
DOCUMENT ME!

Returns:
DOCUMENT ME!

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!

getCurrentBallot

public Ballot getCurrentBallot()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getVoters

public java.util.Set getVoters()
DOCUMENT ME!

Returns:
DOCUMENT ME!

vote

public void vote(Voter voter)
DOCUMENT ME!

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

getVotedStatus

public boolean getVotedStatus(Voter voter)
DOCUMENT ME!

Parameters:
voter - DOCUMENT ME!
Returns:
DOCUMENT ME!

isRoundClosed

public boolean isRoundClosed()
DOCUMENT ME!

Returns:
DOCUMENT ME!

closeRound

public void closeRound()
DOCUMENT ME!


processResult

public boolean processResult(BallotsProcessor method,
                             int round)
DOCUMENT ME!

Parameters:
method - DOCUMENT ME!
round - DOCUMENT ME!
Returns:
DOCUMENT ME!