org.jscience.politics.vote
Class BinarySingleChoiceRandomBallotsProcessor

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

public class BinarySingleChoiceRandomBallotsProcessor
extends java.lang.Object
implements BallotsProcessor

This class represents a way by which you compute results.


Constructor Summary
BinarySingleChoiceRandomBallotsProcessor()
          Creates a new BinarySingleChoiceRandomBallotsProcessor object.
 
Method Summary
 Ballot getResults()
          DOCUMENT ME!
 java.lang.String 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

BinarySingleChoiceRandomBallotsProcessor

public BinarySingleChoiceRandomBallotsProcessor()
Creates a new BinarySingleChoiceRandomBallotsProcessor 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.lang.String 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!