|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gswing.components.common.AllResults
public class AllResults
Purpose: Stores the results for an entire election. Elements of this object are stored in serialised files by the Extracter. The object is built back up by the applet region by region on demand.
Constructor Summary | |
---|---|
AllResults(String stateName)
Constructor. |
Method Summary | |
---|---|
void |
addResult(int type,
String constituency,
Result[] result)
Add results to model. |
void |
addToOverallResult(Result result)
Add this single constituency result to an overall result. |
boolean |
containsResult(char type)
Do ant results for this constituency type exist? |
String |
getGSwingVersion()
Get the version of the software version. |
ListModel |
getList(char type,
String parent)
Returns a list of constituency names. |
Result |
getOverallResult(Date date,
int selection)
Get the overall result in relation to the current result (before or after). |
Hashtable |
getOverallResults()
Returns the Hashtable of overall results. |
Result[] |
getResult(char type,
String constituency)
Get the result. |
Date[] |
getSortedDates()
Sort the dates for all overall results. |
String |
getStateName()
Get the name of the nation state. |
boolean |
resultExists(char type,
String constituency)
Determine if a particular result exists. |
void |
setGSwingVersion(String version)
Set the version of the software. |
protected boolean |
setLeaderVotes(Result result,
Entry entry)
Add the number of votes in an entry (a result from a constituency) to the total votes of the party's leader. |
void |
setList(char type,
Object resultList)
Set a list of constituency names. |
void |
setOverallResult(Date date,
OverallResult result)
Add a result to the overall election result. |
void |
setOverallResults()
Finalise the overall result calculation. |
void |
setOverallResults(String councilName)
Finalise the overall result calculation for council results. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AllResults(String stateName)
stateName
- The nation name.Method Detail |
---|
public ListModel getList(char type, String parent)
type
- The search type. Options: Result.NATION,
Result.REGIONAL, Result.CONSTITUENCY, Result.COUNCIL or
Result.LOCAL
parent
- The parent costituency.
public void setList(char type, Object resultList)
type
- The search type. Options: Result.NATION,
Result.REGIONAL, Result.CONSTITUENCY, Result.COUNCIL or
Result.LOCAL
resultList
- The list of region names.public boolean resultExists(char type, String constituency)
type
- The result type. Possible values: Result.CONSTITUENCY,
Result.REGIONAL or Result.LOCAL
.constituency
- The constituency name.
public Result[] getResult(char type, String constituency)
null
.
type
- The result type. Possible values: Result.CONSTITUENCY,
Result.REGIONAL or Result.LOCAL
.constituency
- The constituency name.
public void addResult(int type, String constituency, Result[] result)
type
- The result type. Possible values: Result.CONSTITUENCY,
Result.REGIONAL or Result.LOCAL
.constituency
- The constituency name.result
- The result array to add.public Hashtable getOverallResults()
public void setOverallResult(Date date, OverallResult result)
date
- The election date.result
- The overall election result.public void addToOverallResult(Result result)
result
- The result to add.protected boolean setLeaderVotes(Result result, Entry entry)
result
- The result to add the votes to.entry
- The entry for a constituency result.
public Result getOverallResult(Date date, int selection)
date
- The date of the current viewed election.selection
- The type of selection - before or after.
public void setOverallResults()
public void setOverallResults(String councilName)
councilName
- The council name.public Date[] getSortedDates()
public String getGSwingVersion()
public void setGSwingVersion(String version)
version
- The m_gswingVersion to set.public boolean containsResult(char type)
type
- The search type. Options: Result.NATION,
Result.REGIONAL, Result.CONSTITUENCY, Result.COUNCIL or
Result.LOCAL
public String getStateName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |