org.jscience.politics.vote
Class BinarySingleChoiceApprovalBallotsProcessor

java.lang.Object
  extended by org.jscience.politics.vote.BinarySingleChoiceApprovalBallotsProcessor
All Implemented Interfaces:
BallotsProcessor

public class BinarySingleChoiceApprovalBallotsProcessor
extends java.lang.Object
implements BallotsProcessor

This class represents a way by which you compute results.


Constructor Summary
BinarySingleChoiceApprovalBallotsProcessor()
          Creates a new BinarySingleChoiceApprovalBallotsProcessor object.
 
Method Summary
 Ballot getResults()
          DOCUMENT ME!
 java.util.Set getResults(java.lang.String choice)
          DOCUMENT ME!
 boolean shouldProceedToNextRound()
          DOCUMENT ME!
 java.util.Set validateBallots(java.util.Set voters, int round)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinarySingleChoiceApprovalBallotsProcessor

public BinarySingleChoiceApprovalBallotsProcessor()
Creates a new BinarySingleChoiceApprovalBallotsProcessor object.

Method Detail

validateBallots

public java.util.Set validateBallots(java.util.Set voters,
                                     int round)
DOCUMENT ME!

Specified by:
validateBallots in interface BallotsProcessor
Parameters:
voters - DOCUMENT ME!
round - DOCUMENT ME!
Returns:
DOCUMENT ME!

getResults

public Ballot getResults()
DOCUMENT ME!

Specified by:
getResults in interface BallotsProcessor
Returns:
DOCUMENT ME!

getResults

public java.util.Set getResults(java.lang.String choice)
DOCUMENT ME!

Parameters:
choice - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

shouldProceedToNextRound

public boolean shouldProceedToNextRound()
DOCUMENT ME!

Specified by:
shouldProceedToNextRound in interface BallotsProcessor
Returns:
DOCUMENT ME!