Expectations
class
class Expectations {
final Set<String> expected;
final Position position;
Expectations(this.expected, this.position);
Expectations best(Expectations other) {
if (position < other.position) return other;
if (position > other.position) return this;
Set<String> newSet = expected..addAll(other.expected);
return new Expectations(newSet, position);
}
}
Constructors
new Expectations(Set<String> expected, Position position) #
Expectations(this.expected, this.position);
Properties
final Set<String> expected #
final Set<String> expected;
Methods
Expectations best(Expectations other) {
if (position < other.position) return other;
if (position > other.position) return this;
Set<String> newSet = expected..addAll(other.expected);
return new Expectations(newSet, position);
}