|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gswing.components.common.Entry
public abstract class Entry
Purpose: Represents an election result entry. That is a single candidate's result.
Constructor Summary | |
---|---|
Entry(Election election,
int votes)
Construcor. |
Method Summary | |
---|---|
int |
compareTo(Entry ob)
Compare the number of votes of this entry with another. |
Election |
getElection()
|
abstract String |
getParticipant()
Get the particpant of the contest. |
abstract Party |
getParty()
Get the party object. |
abstract String |
getPartyName()
Get the party name. |
int |
getPercentage()
Get the percentage of vote. |
int |
getPosition()
Get the position of the candidate in relation to others in the same constituency. |
int |
getVotes()
Get the number of votes. |
void |
incrementPosition()
Add one to the candidates position. |
void |
setPercentage(int percent)
Set the percentage of vote. |
void |
setVotes(int votes)
Set the number of votes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Entry(Election election, int votes)
election
- Reference to the election of this entry.votes
- The number of votes for this candidate.Method Detail |
---|
public abstract String getPartyName()
public abstract Party getParty()
public abstract String getParticipant()
public int getVotes()
public void setVotes(int votes)
votes
- The number of votes.public Election getElection()
public int getPercentage()
public void setPercentage(int percent)
percent
- The percentage of the vote.public int getPosition()
public void incrementPosition()
public int compareTo(Entry ob)
compareTo
in interface Comparable<Entry>
ob
- The object to compare.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |