org.bolson.vote
Class NamedRaw

java.lang.Object
  extended by org.bolson.vote.NameVotingSystem
      extended by org.bolson.vote.NamedRaw

public class NamedRaw
extends NameVotingSystem


Nested Class Summary
 
Nested classes/interfaces inherited from class org.bolson.vote.NameVotingSystem
NameVotingSystem.NameVote, NameVotingSystem.ReverseComparator
 
Field Summary
static java.text.DecimalFormat ratingFormat
           
 
Constructor Summary
NamedRaw()
           
 
Method Summary
 NameVotingSystem.NameVote[] getWinners()
           
 java.lang.StringBuffer htmlSummary(java.lang.StringBuffer sb)
          Get HTML summary of voting system state.
 java.lang.String name()
           
 void voteRating(NameVotingSystem.NameVote[] vote)
          Vote a set of ratings.
 
Methods inherited from class org.bolson.vote.NameVotingSystem
defaultMain, denibble, depercentHexify, fromUrlEncoded, getDebug, getImplNames, getIpmlForName, htmlExplain, htmlExplain, htmlSummary, init, nameEqStrToVoteArray, nameEqStrToVoteArray, percentHexify, readVotes, registerImpl, resultsHTMLDisplay, sort, urlEncode, voteNameEqStr, voteOrderSpec, voteRating, voteSpecToNameVoteArray, winnerSummaryHTMLTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ratingFormat

public static java.text.DecimalFormat ratingFormat
Constructor Detail

NamedRaw

public NamedRaw()
Method Detail

voteRating

public void voteRating(NameVotingSystem.NameVote[] vote)
Description copied from class: NameVotingSystem
Vote a set of ratings. Keys of the map should be strings (choice names) and values should be of a numeric type. This is slightly faster than the version that takes a map because no conversion is done.

Specified by:
voteRating in class NameVotingSystem
Parameters:
vote - a set of (name,rating) pairs
See Also:
NameVotingSystem.voteRating(Map)

getWinners

public NameVotingSystem.NameVote[] getWinners()
Specified by:
getWinners in class NameVotingSystem
Returns:
A sorted array of (name,rating) pairs. Ties can be determined by rating.

htmlSummary

public java.lang.StringBuffer htmlSummary(java.lang.StringBuffer sb)
Description copied from class: NameVotingSystem
Get HTML summary of voting system state.

Specified by:
htmlSummary in class NameVotingSystem
Parameters:
sb - a valid StringBuffer to which HTML summary will be appended.
Returns:
same StringBuffer passed in, with HTML summary of voting system state appended.

name

public java.lang.String name()
Specified by:
name in class NameVotingSystem
Returns:
name of this voting system (may be modified by settings from init)