PriorityStreamIterator<T extends Comparable<Object> > class
A StreamIterator that accumulates the Stream's values into a priority queue and selects the one with the most priority (the least one by comparison) of all accumulated values at each moveNext call.
- Implemented types
-
- StreamIterator<
T?>
- StreamIterator<
Constructors
-
PriorityStreamIterator(Stream<
T> stream, [int comparison(T a, T b)?]) -
Create a PriorityStreamIterator on
stream
with an optionalcomparison
function. Ifcomparison
is not provided,T
must implement Comparable
Properties
- current → T?
-
The current value of the stream.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
) → Future< Object?> -
Cancels the stream iterator (and the underlying stream subscription) early.
override
-
moveNext(
) → Future< bool> -
Wait for the next stream value to be available.
override
-
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