Interface RaceResult
- All Superinterfaces:
Browsable, Extensible, Identifiable, OsidCompendium, OsidObject, Subjugateable
The results for a candidate in a race.
-
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, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidCompendium
getEndDate, getStartDate, isExtrapolated, isInterpolatedModifier and TypeMethodDescriptionGets the end date used in the evaluation of the transactional data on which this report is based.Gets the start date used in the evaluation of the transactional data on which this report is based.booleanTests if this report is extrapolated outside measured data or known transactions.booleanTests if this report is interpolated within measured data or known transactions.Methods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.
-
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.
-