use of java8.util.function.DoubleConsumer in project streamsupport by stefan-zobel.
the class DoublePipeline method forEachWithCancel.
@Override
final boolean forEachWithCancel(Spliterator<Double> spliterator, Sink<Double> sink) {
Spliterator.OfDouble spl = adapt(spliterator);
DoubleConsumer adaptedSink = adapt(sink);
boolean cancelled;
do {
} while (!(cancelled = sink.cancellationRequested()) && spl.tryAdvance(adaptedSink));
return cancelled;
}
Aggregations