CondorcetElection<TCandidate extends Comparable> class
- Inheritance
-
- Object
- ElectionResult<
TCandidate, ElectionPlace< TCandidate> > - Election<
TCandidate, ElectionPlace< TCandidate> > - CondorcetElection
- Mixed in types
-
- CondorcetElectionResult<
TCandidate>
- CondorcetElectionResult<
- Annotations
-
- @immutable
Constructors
-
CondorcetElection(List<
RankedBallot< ballots, {Iterable<TCandidate> >TCandidate> ? candidates}) -
factory
Properties
-
ballots
→ List<
Ballot< TCandidate> > -
All of the ballots cast in the election.
finalinherited
-
candidates
→ List<
TCandidate> -
All of the candidates in the election.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSingleWinner → bool
-
Returns
true
if there is a single winner in the election (there is no tie).no setterinherited -
pairs
→ Set<
CondorcetPair< TCandidate> > -
final
-
places
→ List<
ElectionPlace< TCandidate> > -
The ordered result of the election.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- singleWinner → TCandidate?
-
If hasSingleWinner is
true
, returns the corresponding candidate.no setterinherited
Methods
-
getPair(
TCandidate c1, TCandidate c2) → CondorcetPair< TCandidate> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited