|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gswing.components.common.Candidate
public class Candidate
Purpose: Represents a single candidate standing in an election.
| Field Summary | |
|---|---|
static int |
REV_WITH_COMMA
|
static int |
REV_WITHOUT_COMMA
|
static int |
WITH_COMMA
|
static int |
WITHOUT_COMMA
|
| Constructor Summary | |
|---|---|
Candidate(String firstName,
String surname,
Party party)
Constructor. |
|
Candidate(String firstName,
String surname,
String party)
Constructor. |
|
| Method Summary | |
|---|---|
String |
getFirstName()
Get the candidates first name. |
String |
getFullName()
Get the candidates full name. |
String |
getFullName(int format)
Get the candidates full name. |
String |
getParty()
Get the party abbreviation that the candidate belongs to. |
String |
getPartyFullName()
Get the party that the candidate belongs to. |
Party |
getPartyObject()
Get the party that the candidate belongs to. |
String |
getSurname()
Get the candidates surname. |
void |
setFirstName(String firstName)
Set candidates surname. |
void |
setParty(String party)
Set party that the candidate is a member of. |
void |
setSurname(String surname)
Set candidates surname. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int WITH_COMMA
public static final int WITHOUT_COMMA
public static final int REV_WITHOUT_COMMA
public static final int REV_WITH_COMMA
| Constructor Detail |
|---|
public Candidate(String firstName,
String surname,
Party party)
firstName - The candidates first name.surname - The candidates surname.party - The party that the candidate belongs to.
public Candidate(String firstName,
String surname,
String party)
firstName - The candidates first name.surname - The candidates surname.party - The party that the candidate belongs to.| Method Detail |
|---|
public String getFullName()
public String getFullName(int format)
public String getParty()
public String getPartyFullName()
public Party getPartyObject()
public String getFirstName()
public String getSurname()
public void setSurname(String surname)
surname - The candiate's surname.public void setFirstName(String firstName)
firstName - The candidate's first name.public void setParty(String party)
party - The candidate's party abbreviation.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||