Dart DocumentationparsersExpectations

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.

docs inherited from Object
Expectations(this.expected, this.position);

Properties

final Set<String> expected #

final Set<String> expected

final Position position #

final Position position

Methods

Expectations best(Expectations other) #

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);
}