Interface RaceResult

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidCompendium, OsidObject, Subjugateable

public interface RaceResult extends OsidCompendium

The results for a candidate in a race.

  • Method Details

    • getRaceId

      Id getRaceId()
      Geta the race Id of the vote.
      Returns:
      the ballot Id
      Compliance:
      mandatory - This method must be implemented.
    • getRace

      Race getRace() throws OperationFailedException
      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 candidate Id.
      Returns:
      a candidate Id
      Compliance:
      mandatory - This method must be implemented.
    • getCandidate

      Candidate getCandidate() throws OperationFailedException
      Gets the Candidate.
      Returns:
      the candidate
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getResourceId

      Id getResourceId()
      Gets the resource Id. A resource represents a voter or group of voters across a demographic.
      Returns:
      a resource Id
      Compliance:
      mandatory - This method must be implemented.
    • getResource

      Resource getResource() throws OperationFailedException
      Gets the Resource. 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:
      true if these results are final, false otherwise
      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

      RaceResultRecord getRaceResultRecord(Type raceResultsRecordType) throws OperationFailedException
      Gets the race result record corresponding to the given RaceResults record Type. This method is used to retrieve an object implementing the requested record. The raceResultsRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(raceResultsRecordType) is true.
      Parameters:
      raceResultsRecordType - the type of the record to retrieve
      Returns:
      the race results record
      Throws:
      NullArgumentException - raceResultsRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(raceResultsRecordType) is false
      Compliance:
      mandatory - This method must be implemented.