ElectionResult<TCandidate extends Comparable, TElectionPlace extends ElectionPlace<TCandidate>> class abstract

The baseclass for the results of an Election.

Implementations may not include ballot information, to protect the privacy of ballots – or just to allow visualization of an election result.

Implementers

Constructors

ElectionResult({required List<TCandidate> candidates, required List<TElectionPlace> places})

Properties

candidates List<TCandidate>
All of the candidates in the election.
final
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 setter
places List<TElectionPlace>
The ordered result of the election.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
singleWinner → TCandidate?
If hasSingleWinner is true, returns the corresponding candidate.
no setter

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