StopSequenceFilter class final
Filters a text stream so generation stops at the first stop sequence.
Constructors
-
StopSequenceFilter(List<
String> stopSequences, {void onStop()?}) -
Creates a filter for
stopSequences.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onStop → void Function()?
-
Invoked when a stop sequence match ends the stream.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stopSequences
→ List<
String> -
Stop markers that must be stripped from output.
final
Methods
-
bind(
Stream< String> tokens) → Stream<String> -
Applies this filter to
tokens. -
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