org.jscience.politics.vote
Class BinaryApprovalBallotsProcessor

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

public class BinaryApprovalBallotsProcessor
extends java.lang.Object
implements BallotsProcessor

This class represents a way by which you compute results.


Constructor Summary
BinaryApprovalBallotsProcessor()
          Creates a new BinaryApprovalBallotsProcessor 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

BinaryApprovalBallotsProcessor

public BinaryApprovalBallotsProcessor()
Creates a new BinaryApprovalBallotsProcessor 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!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

getResults

public Ballot getResults()
DOCUMENT ME!

Specified by:
getResults in interface BallotsProcessor
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - 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!