Interface RaceResult
- All Superinterfaces:
Browsable, Extensible, Identifiable, OsidCompendium, OsidObject, Subjugateable
The results for a candidate in a race.
Like all OsidObjects, RaceResult is managed by its
OsidSessions and may not be accessed by concurrent processing
threads.
-
Method Summary
Modifier and TypeMethodDescriptionGets theCandidate.Gets the candidateId.Gets the mean number of votes cast for this candidate.longGets the median number of votes cast for this candidate.getRace()Gets the race of the vote.Geta the raceIdof the vote.getRaceResultRecord(Type raceResultsRecordType) Gets the race result record corresponding to the givenRaceResultsrecordType.Gets theResource.Gets the resourceId.longGets the total number of votes cast for this candidate.Gets the standard deviation of the votes.booleanisFinal()Tests if these results are final.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeMethods inherited from interface Extensible
getRecordTypes, hasRecordTypeMethods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidCompendium
getEndDate, getStartDate, isExtrapolated, isInterpolatedMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusType
-
Method Details
-
getRaceId
Id getRaceId()Geta the raceIdof the vote.- Returns:
- the ballot
Id - Compliance:
mandatory- This method must be implemented.
-
getRace
Gets the race of the vote.- Returns:
- the race
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getCandidateId
Id getCandidateId()Gets the candidateId.- Returns:
- a candidate
Id - Compliance:
mandatory- This method must be implemented.
-
getCandidate
Gets theCandidate.- Returns:
- the candidate
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getResourceId
Id getResourceId()Gets the resourceId. A resource represents a voter or group of voters across a demographic.- Returns:
- a resource
Id - Compliance:
mandatory- This method must be implemented.
-
getResource
Gets theResource. A resource represents a voter or group of voters across a demographic.- Returns:
- the resource
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
isFinal
boolean isFinal()Tests if these results are final.- Returns:
trueif these results are final,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getTotalVotes
long getTotalVotes()Gets the total number of votes cast for this candidate.- Returns:
- the total number of votes cast
- Compliance:
mandatory- This method must be implemented.
-
getMeanVotes
BigDecimal getMeanVotes()Gets the mean number of votes cast for this candidate.- Returns:
- the mean number of votes cast
- Compliance:
mandatory- This method must be implemented.
-
getMedianVotes
long getMedianVotes()Gets the median number of votes cast for this candidate.- Returns:
- the median number of votes cast
- Compliance:
mandatory- This method must be implemented.
-
getVoteStandardDeviation
BigDecimal getVoteStandardDeviation()Gets the standard deviation of the votes.- Returns:
- the standard deviation
- Compliance:
mandatory- This method must be implemented.
-
getRaceResultRecord
Gets the race result record corresponding to the givenRaceResultsrecordType. This method is used to retrieve an object implementing the requested record. TheraceResultsRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(raceResultsRecordType)istrue.- Parameters:
raceResultsRecordType- the type of the record to retrieve- Returns:
- the race results record
- Throws:
NullArgumentException-raceResultsRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(raceResultsRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-