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) #
Creates a new Object instance.
Object instances have no meaningful state, and are only useful
through their identity. An Object instance is equal to itself
only.
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);
}