|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gswing.components.common.SimpleConstituency
org.gswing.components.common.Constituency
public class Constituency
Represents a electoral constituency. This is national, regional, council, constituency or local.
Constructor Summary | |
---|---|
Constituency(String name,
int number,
char type,
SimpleConstituency parent)
Constructor. |
Method Summary | |
---|---|
int |
compareTo(Constituency left)
Compare another constituency to this. |
boolean |
equals(Object obj)
Compare another constituency with this. |
String |
getParentName()
Get the name of the parent constituency. |
int |
getParentNo()
Get the unique parent identifier for this constituency. |
static char |
getParentType(char child)
The parent constituency char. |
char |
getType()
The constituency type - national, regional, council, constituency or local (defined in Result). |
static char |
getType(String type)
Convert string type to constituency type. |
void |
setType(char type)
Set the constituency type. |
String |
toString()
Get this constituency as a string. |
Methods inherited from class org.gswing.components.common.SimpleConstituency |
---|
getConstituencyNo, getName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Constituency(String name, int number, char type, SimpleConstituency parent)
name
- The constituency name.number
- The unique constituency number (primary key) in the database.type
- The constituency type - national, regional, council,
constituency or local (defined in Result).parent
- The parent constituency.Method Detail |
---|
public char getType()
public static char getParentType(char child)
child
- The child constituency.
public void setType(char type)
type
- The new char type.public static char getType(String type)
type
- The type as a string as stored in the database.
public int getParentNo()
public String getParentName()
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
obj
- The constituency to compare this with.
public int compareTo(Constituency left)
compareTo
in interface Comparable<Constituency>
left
- The object to compare with this.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |