|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bolson.vote.vote
public class vote
Command line app for processing votes.
Constructor Summary | |
---|---|
vote()
|
Method Summary | |
---|---|
static java.lang.Object |
CListToNumberArray(java.lang.String cd,
int numc,
java.util.Hashtable namehash)
|
void |
displayTab()
|
void |
initHistogram()
|
static void |
main(java.lang.String[] argv)
|
static java.lang.String[] |
namehashToNameArray(java.util.Hashtable namehash)
|
static java.lang.String[] |
namehashToNameArray(java.util.Hashtable namehash,
int numc)
|
static void |
printVote(float[] pf)
|
static void |
printVote(int[] pf)
|
java.lang.String[] |
readArgv(java.lang.String[] argv)
|
static void |
resultsHTMLDisplay(java.io.PrintWriter out,
VotingSystem[] vs,
java.lang.String[] cnames,
boolean debug,
int numSeats)
Print full results. |
void |
setNames(java.lang.String[] namesi)
|
static java.lang.Object |
StringToNumberArray(java.lang.String votes,
int len)
|
static java.lang.String |
stripNonDig(java.lang.String s)
utility to StringToNumberArray and CListToNumberArray |
void |
voteFloatFromVoteSource(org.bolson.vote.vote.VoteSource vs)
|
void |
voteFromTextFile(java.lang.String filename)
|
void |
voteFromVoteSource(org.bolson.vote.vote.VoteSource vs)
|
void |
voteFromVoteSourceWithInit(org.bolson.vote.vote.VoteSource vs)
|
void |
voteIntFromVoteSource(org.bolson.vote.vote.VoteSource vs)
|
void |
voteOne(float[] pf)
|
void |
voteOne(int[] pi)
|
void |
voteReader(java.io.Reader r)
|
void |
voteStream(java.io.DataInputStream dis)
|
void |
voteStream(java.io.InputStream is)
|
static void |
winnerSummaryHTMLTable(java.io.PrintWriter out,
VotingSystem[] vs,
java.lang.String[] cnames,
boolean debug,
int numSeats)
Print summary table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public vote()
Method Detail |
---|
public static java.lang.String stripNonDig(java.lang.String s)
public static java.lang.Object StringToNumberArray(java.lang.String votes, int len)
public static java.lang.Object CListToNumberArray(java.lang.String cd, int numc, java.util.Hashtable namehash) throws java.lang.Exception
java.lang.Exception
public static java.lang.String[] namehashToNameArray(java.util.Hashtable namehash)
public static java.lang.String[] namehashToNameArray(java.util.Hashtable namehash, int numc)
public void initHistogram()
public void voteStream(java.io.InputStream is)
public void voteStream(java.io.DataInputStream dis)
public void voteReader(java.io.Reader r)
public void voteFromTextFile(java.lang.String filename) throws java.lang.Exception
java.lang.Exception
public void voteFromVoteSourceWithInit(org.bolson.vote.vote.VoteSource vs)
public static void printVote(float[] pf)
public static void printVote(int[] pf)
public void voteOne(float[] pf)
public void voteOne(int[] pi)
public void voteFloatFromVoteSource(org.bolson.vote.vote.VoteSource vs)
public void voteIntFromVoteSource(org.bolson.vote.vote.VoteSource vs)
public void voteFromVoteSource(org.bolson.vote.vote.VoteSource vs)
public static void winnerSummaryHTMLTable(java.io.PrintWriter out, VotingSystem[] vs, java.lang.String[] cnames, boolean debug, int numSeats)
out
- receives the html tablevs
- systems that have been voted and can getWinnerscnames
- choice names to match with winner indeciesdebug
- sets if getWinners is to collect debug infonumSeats
- number of seats available in this electionpublic static void resultsHTMLDisplay(java.io.PrintWriter out, VotingSystem[] vs, java.lang.String[] cnames, boolean debug, int numSeats)
out
- receives the html resultsvs
- systems that have been voted and can getWinnerscnames
- choice names to match with winner indeciesdebug
- sets if getWinners is to collect debug infonumSeats
- number of seats available in this electionpublic void displayTab()
public static void main(java.lang.String[] argv)
public java.lang.String[] readArgv(java.lang.String[] argv)
argv
- like main()
public void setNames(java.lang.String[] namesi)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |