BallotLines<TCandidate extends Comparable> class

A helper for creating RankedBallots by parsing text input.

Useful for development and debugging.

Constructors

BallotLines(List<BallotLine<TCandidate>> _lines, {String candidateToText(TCandidate) = _defaultCandidateText})
BallotLines.fromBallots(Iterable<RankedBallot<TCandidate>> ballots, {String candidateToText(TCandidate) = _defaultCandidateText})
factory
BallotLines.parse(String input, Map<String, TCandidate> candidateFromText(Set<String>), {String candidateToText(TCandidate) = _defaultCandidateText})
factory

Properties

ballots Iterable<RankedBallot<TCandidate>>
no setter
candidateToText String Function(TCandidate)
final
candidateWidth int
final
countWidth int
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
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.
override