org.bolson.vote
Class InstantProxy.Card

java.lang.Object
  extended by org.bolson.vote.InstantProxy.Card
All Implemented Interfaces:
java.lang.Comparable
Enclosing class:
InstantProxy

public static class InstantProxy.Card
extends java.lang.Object
implements java.lang.Comparable


Field Summary
 int[] proxies
          proxies sorted by priority, vote goes to first which voted
 int uid
          this voter's user id
 
Constructor Summary
InstantProxy.Card(int uidIn, int[] proxiesIn)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
static InstantProxy.Card[] readProxies(java.io.Reader inr)
          Read proxy declarations from a text file.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

uid

public int uid
this voter's user id


proxies

public int[] proxies
proxies sorted by priority, vote goes to first which voted

Constructor Detail

InstantProxy.Card

public InstantProxy.Card(int uidIn,
                         int[] proxiesIn)
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

readProxies

public static InstantProxy.Card[] readProxies(java.io.Reader inr)
Read proxy declarations from a text file. Each line should be contain a list of decimal integers. The first number is the uid of the voter for which the rest of the numbers are prioritized uid numbers of proxy recipients. e.g.