OSID Logo
OSID Specifications
voting rules package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.rules.RaceProcessor
Implementsosid.OsidProcessor
Description

A RaceProcessor describes the rules for managing the behavior of a race.

MethodhasMaximumWinners
Description

Tests if there is a limit on the number of winners in a race.

Returnboolean true if a limit on the number of winners, false if no limit exists
CompliancemandatoryThis method must be implemented.
MethodgetMaximumWinners
Description

Gets the number of maximum winners in a race.

Returncardinalthe maximum number of winners permitted
ErrorsILLEGAL_STATE hasMaximumWinners() is false
CompliancemandatoryThis method must be implemented.
MethodgetMinimumPercentageToWin
Description

Gets the minimum percentage (0-100) of total votes to be declared a winner in a race.

Returncardinalthe minimum percentage
CompliancemandatoryThis method must be implemented.
MethodgetMinimumVotesToWin
Description

Gets the minimum votesl votes to be declared a winner in a race.

Returncardinalthe minimum votes
CompliancemandatoryThis method must be implemented.
MethodgetRaceProcessorRecord
Description

Gets the race processor record corresponding to the given RaceProcessor record Type. This method is used to retrieve an object implementing the requested record. The raceProcessorRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(raceProcessorRecordType) is true .

Parametersosid.type.TyperaceProcessorRecordTypethe type of race processor record to retrieve
Returnosid.voting.rules.records.RaceProcessorRecordthe race processor record
ErrorsNULL_ARGUMENT raceProcessorRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(raceProcessorRecordType) is false
CompliancemandatoryThis method must be implemented.