|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gswing.components.common.Election
public class Election
Purpose: Class represents a single election.
Constructor Summary | |
---|---|
Election(int electionNo,
String type,
Date date)
Constructor. |
|
Election(int electionNo,
String name,
String type,
String system,
Date date)
Constructor. |
|
Election(String type,
Date date)
Constructor. |
|
Election(String name,
String type,
String system,
Date date)
Constructor. |
Method Summary | |
---|---|
int |
compare(Object lhs,
Object rhs)
Compare elections for sorting. |
Date |
getDate()
Get the date the election took place. |
int |
getElectionNo()
Get the unique election number of this election. |
String |
getName()
Get the name of this election. |
String |
getSystem()
Get the electoral system of this election. |
String |
getType()
Get the election type - general, devolved, regional, local etc. |
boolean |
isByElection()
|
boolean |
isStandalone()
A standalone election is an election that is used to build an overall result. |
void |
setName(String name)
Set the name of this election. |
void |
setStandalone(Vector elections)
Set whether this election is standalone. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public Election(int electionNo, String name, String type, String system, Date date)
electionNo
- The unique election number.name
- The name given to the election.type
- The election type - general, devolved, regional, local etc.system
- The electoral system - eg. F.P.T.F. ot list.date
- The date the election took place.public Election(String name, String type, String system, Date date)
name
- The election name.type
- The election type - general, devolved, regional, local etc..system
- The election system - F.P.T.P, List etc.date
- The date the election took place.public Election(int electionNo, String type, Date date)
electionNo
- The unique election number.type
- The election type - general, devolved, regional, local etc.date
- The date the election took place.public Election(String type, Date date)
type
- The election type - general, devolved, regional, local etc.date
- The date the election took place.Method Detail |
---|
public int getElectionNo()
public String getName()
public void setName(String name)
name
- The election name.public String getType()
public Date getDate()
public String getSystem()
public boolean isStandalone()
public void setStandalone(Vector elections)
elections
- Vector of elections in the database.public boolean isByElection()
public String toString()
toString
in class Object
public int compare(Object lhs, Object rhs)
compare
in interface Comparator
lhs
- Left hand side election.rhs
- Right hand side election.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |