|
SOA © 2004 SoS Group All Rights Reserved |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sos.koa.CandidateList
The CandidateList stores all of the information embodied in the XML-based candidate list files provided by the KOA application.
Class Specifications |
invariant my_kieskringen.size() <= MAX_KIESKRINGEN_PER_CANDIDATE_LIST; invariant my_kieskringen.owner == this; invariant my_metadata.owner == this; invariant my_candidate_codes.owner == this; invariant 0 <= my_blanco_count; invariant ( \forall int i; ; getCandidate(i) == getCandidate(Integer.toString(i))); invariant ( \forall int i; ; validCandidate(i) == validCandidate(Integer.toString(i))); |
Field Summary | |
(package private) static byte |
MAX_KIESKRINGEN_PER_CANDIDATE_LIST
The maximum number of kieskringen that can exist in a candidate list. |
[spec_public] private byte |
my_blanco_count
The number of "blanco" candidates contained in this candidate list. |
[spec_public] private java.util.Map |
my_candidate_codes
The candidate codes of this candidate list. |
[spec_public] (package private) java.util.SortedMap |
my_kieskringen
The kieskringen contained in this candidate list. |
[spec_public] (package private) CandidateListMetadata |
my_metadata
The metadata associated with this candidate list. |
Constructor Summary | |
(package private) |
CandidateList(non_null java.lang.String a_request_reference,
non_null java.lang.String a_response_reference,
non_null java.lang.String a_creation_time,
non_null java.lang.String a_kieskring_count,
non_null java.lang.String a_district_count,
non_null java.lang.String a_kieslijst_count,
non_null java.lang.String a_positie_count,
non_null java.lang.String a_code_count)
Construct a new candidate list object given the specified initialization values. |
Method Summary | |
(package private) Candidate |
addCandidate(non_null KiesKring a_kieskring,
non_null KiesLijst a_kieslijst,
non_null java.lang.String a_position_number,
non_null java.lang.String a_lastname,
non_null java.lang.String some_initials,
non_null java.lang.String a_firstname,
non_null java.lang.String a_gender,
non_null java.lang.String a_city_of_residence)
Add the specified candidate to this candidate list. |
(package private) boolean |
addCandidateCode(non_null Candidate a_candidate,
non_null java.lang.String a_candidate_code)
Adds the specified candidiate code, bound to the specified candidate, to this candidate list. |
(package private) District |
addDistrict(non_null KiesKring a_kieskring,
int a_district_number,
non_null java.lang.String a_name)
Add the specified district, contained in a specific kieskring, to this candidate list. |
(package private) KiesKring |
addKiesKring(byte a_kieskring_number,
non_null java.lang.String a_name)
Add the specified kieskring to this candidate list. |
(package private) KiesLijst |
addKiesLijst(non_null KiesKring a_kieskring,
byte a_kieslijst_number,
non_null java.lang.String a_groepering_name)
Add the specified kieslijst, contained in a specific kieskring, to this candidate list. |
(package private) byte |
blancoCount()
|
(package private) byte |
candidatesPerParty(non_null KiesLijst a_kieslijst)
|
(package private) void |
clear()
Clears all data in this CandidateList instance. |
(package private) Candidate |
getCandidate(int a_candidate_code)
|
(package private) Candidate |
getCandidate(non_null java.lang.String a_candidate_code)
|
(package private) CandidateListMetadata |
metadata()
|
(package private) byte |
totalPartyCount()
|
(package private) boolean |
validCandidate(int a_candidate_code)
|
(package private) boolean |
validCandidate(non_null java.lang.String a_candidate_code)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final byte MAX_KIESKRINGEN_PER_CANDIDATE_LIST
java.util.SortedMap my_kieskringen
CandidateListMetadata my_metadata
private java.util.Map my_candidate_codes
private byte my_blanco_count
Constructor Detail |
CandidateList(non_null java.lang.String a_request_reference, non_null java.lang.String a_response_reference, non_null java.lang.String a_creation_time, non_null java.lang.String a_kieskring_count, non_null java.lang.String a_district_count, non_null java.lang.String a_kieslijst_count, non_null java.lang.String a_positie_count, non_null java.lang.String a_code_count)
a_request_reference
- the request reference of the
associated candidate list.a_response_reference
- the response reference of the
associated candidate list.a_creation_time
- the creation time of the associated
candidate list.a_kieskring_count
- the number of kieskringen in the
associated candidate list.a_district_count
- the number of districts in the associated
candidate list.a_kieslijst_count
- the number of kieslijsten in the
associated candidate list.a_positie_count
- the total number of candidates in the
associated candidate list.a_code_count
- the number of candidate codes contained in
the associated candidate list.
Method Detail |
final KiesKring addKiesKring(byte a_kieskring_number, non_null java.lang.String a_name)
a_kieskring_number
- the number of the kieskring to add.a_name
- the name of the kieskring to add.
final District addDistrict(non_null KiesKring a_kieskring, int a_district_number, non_null java.lang.String a_name)
a_kieskring
- the kieskring in which the district being
added resides.a_district_number
- the number of the district to add.a_name
- the name of the district to add.
sos.koa.District#District(sos.koa.KiesKring, int, java.lang.String)
final KiesLijst addKiesLijst(non_null KiesKring a_kieskring, byte a_kieslijst_number, non_null java.lang.String a_groepering_name)
a_kieskring
- the kieskring in which the district being
added resides.a_kieslijst_number
- the number of the kieslijst to add.a_groepering_name
- the name of the groupering to add.
final Candidate addCandidate(non_null KiesKring a_kieskring, non_null KiesLijst a_kieslijst, non_null java.lang.String a_position_number, non_null java.lang.String a_lastname, non_null java.lang.String some_initials, non_null java.lang.String a_firstname, non_null java.lang.String a_gender, non_null java.lang.String a_city_of_residence)
a_kieskring
- the kieskring to which the candidate belongs.a_kieslijst
- the kieslijst to which the candidate belongs.a_position_number
- the position number of the candidate.a_lastname
- the lastname of the new candidate.a_firstname
- the firstname of the new candidate.some_initials
- the initial of the new candidate.a_gender
- the gender of the new candidate.a_city_of_residence
- the city of residence of the new
candidate.
final boolean addCandidateCode(non_null Candidate a_candidate, non_null java.lang.String a_candidate_code)
a_candidate
- the candidate to which we bind the candidate code.a_candidate_code
- the candidate code to bind to the candidate.
final Candidate getCandidate(non_null java.lang.String a_candidate_code)
a_candidate_code
- the candidate code we are interested in.
final boolean validCandidate(non_null java.lang.String a_candidate_code)
a_candidate_code
- the candidate code we are interested in.
final Candidate getCandidate(int a_candidate_code)
a_candidate_code
- the candidate code we are interested in.
final boolean validCandidate(int a_candidate_code)
a_candidate_code
- the candidate code we are interested in.
final CandidateListMetadata metadata()
final byte candidatesPerParty(non_null KiesLijst a_kieslijst)
a_kieslijst
- the kieslijst (party) that we are interested in.
final byte totalPartyCount()
final byte blancoCount()
final void clear()
CandidateList
instance. In
particular, all kieskring references are cleared.
|
SOA © 2004 SoS Group All Rights Reserved |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |