public class LongStreamDecorator extends Object implements LongStream
LongStreamDecorator wraps a Java LongStream and registers a closeHandler
which is passed further to any resulting Stream.
The goal of the LongStreamDecorator is to close the underlying LongStream upon
calling a terminal operation.LongStream.Builder| Constructor and Description |
|---|
LongStreamDecorator(LongStream delegate,
Runnable closeHandler) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuilder, concat, empty, generate, iterate, of, of, range, rangeClosedpublic LongStreamDecorator(LongStream delegate, Runnable closeHandler)
public LongStream filter(LongPredicate predicate)
filter in interface LongStreampublic LongStream map(LongUnaryOperator mapper)
map in interface LongStreampublic <U> Stream<U> mapToObj(LongFunction<? extends U> mapper)
mapToObj in interface LongStreampublic IntStream mapToInt(LongToIntFunction mapper)
mapToInt in interface LongStreampublic DoubleStream mapToDouble(LongToDoubleFunction mapper)
mapToDouble in interface LongStreampublic LongStream flatMap(LongFunction<? extends LongStream> mapper)
flatMap in interface LongStreampublic LongStream distinct()
distinct in interface LongStreampublic LongStream sorted()
sorted in interface LongStreampublic LongStream peek(LongConsumer action)
peek in interface LongStreampublic LongStream limit(long maxSize)
limit in interface LongStreampublic LongStream skip(long n)
skip in interface LongStreampublic void forEach(LongConsumer action)
forEach in interface LongStreampublic void forEachOrdered(LongConsumer action)
forEachOrdered in interface LongStreampublic long[] toArray()
toArray in interface LongStreampublic long reduce(long identity,
LongBinaryOperator op)
reduce in interface LongStreampublic OptionalLong reduce(LongBinaryOperator op)
reduce in interface LongStreampublic <R> R collect(Supplier<R> supplier, ObjLongConsumer<R> accumulator, BiConsumer<R,R> combiner)
collect in interface LongStreampublic long sum()
sum in interface LongStreampublic OptionalLong min()
min in interface LongStreampublic OptionalLong max()
max in interface LongStreampublic long count()
count in interface LongStreampublic OptionalDouble average()
average in interface LongStreampublic LongSummaryStatistics summaryStatistics()
summaryStatistics in interface LongStreampublic boolean anyMatch(LongPredicate predicate)
anyMatch in interface LongStreampublic boolean allMatch(LongPredicate predicate)
allMatch in interface LongStreampublic boolean noneMatch(LongPredicate predicate)
noneMatch in interface LongStreampublic OptionalLong findFirst()
findFirst in interface LongStreampublic OptionalLong findAny()
findAny in interface LongStreampublic DoubleStream asDoubleStream()
asDoubleStream in interface LongStreampublic Stream<Long> boxed()
boxed in interface LongStreampublic LongStream sequential()
sequential in interface BaseStream<Long,LongStream>sequential in interface LongStreampublic LongStream parallel()
parallel in interface BaseStream<Long,LongStream>parallel in interface LongStreampublic LongStream unordered()
unordered in interface BaseStream<Long,LongStream>public LongStream onClose(Runnable closeHandler)
onClose in interface BaseStream<Long,LongStream>public void close()
close in interface AutoCloseableclose in interface BaseStream<Long,LongStream>public PrimitiveIterator.OfLong iterator()
iterator in interface BaseStream<Long,LongStream>iterator in interface LongStreampublic Spliterator.OfLong spliterator()
spliterator in interface BaseStream<Long,LongStream>spliterator in interface LongStreampublic boolean isParallel()
isParallel in interface BaseStream<Long,LongStream>Copyright © 2001-2022 Red Hat, Inc. All Rights Reserved.