org.gswing.components.common
Class ConstituencyEntry

java.lang.Object
  extended by org.gswing.components.common.Entry
      extended by org.gswing.components.common.ConstituencyEntry
All Implemented Interfaces:
Serializable, Comparable<Entry>

public class ConstituencyEntry
extends Entry

Purpose: Represents an election constituency result entry. That is a single candidate's result.

See Also:
Serialized Form

Constructor Summary
ConstituencyEntry(Election election, Candidate candidate, int votes)
          Construcor.
 
Method Summary
 Candidate getCandidate()
           
 String getParticipant()
          Get the contest participant, in this case the candidate's full name.
 Party getParty()
          Get the party object.
 String getPartyName()
          Get the party name.
 
Methods inherited from class org.gswing.components.common.Entry
compareTo, getElection, getPercentage, getPosition, getVotes, incrementPosition, setPercentage, setVotes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstituencyEntry

public ConstituencyEntry(Election election,
                         Candidate candidate,
                         int votes)
Construcor.

Parameters:
election - The election this entry is part of.
candidate - The candidate details.
votes - The number of votes for this candidate.
Method Detail

getPartyName

public String getPartyName()
Get the party name.

Specified by:
getPartyName in class Entry
Returns:
The party name.

getParty

public Party getParty()
Get the party object.

Specified by:
getParty in class Entry
Returns:
The the party object.

getParticipant

public String getParticipant()
Get the contest participant, in this case the candidate's full name.

Specified by:
getParticipant in class Entry
Returns:
The contest participant.

getCandidate

public Candidate getCandidate()
Returns:
Returns the candidate object.


Copyright © 2008. All Rights Reserved.