ApprovalElection<TCandidate extends Comparable> class
- Inheritance
-
- Object
- ElectionResult<
TCandidate, PluralityElectionPlace< TCandidate> > - Election<
TCandidate, PluralityElectionPlace< TCandidate> > - ApprovalElection
- Annotations
-
- @immutable
Constructors
-
ApprovalElection(List<
ApprovalBallot< 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 -
places
→ List<
PluralityElectionPlace< 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
-
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