Package org.hibernate.query.spi
Class DoubleStreamDecorator
- java.lang.Object
-
- org.hibernate.query.spi.DoubleStreamDecorator
-
- All Implemented Interfaces:
AutoCloseable,BaseStream<Double,DoubleStream>,DoubleStream
public class DoubleStreamDecorator extends Object implements DoubleStream
TheDoubleStreamDecoratorwraps a JavaDoubleStreamand registers acloseHandlerwhich is passed further to any resultingStream.The goal of the
DoubleStreamDecoratoris to close the underlyingDoubleStreamupon calling a terminal operation.- Since:
- 5.4
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.stream.DoubleStream
DoubleStream.Builder
-
-
Constructor Summary
Constructors Constructor Description DoubleStreamDecorator(DoubleStream delegate, Runnable closeHandler)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.stream.DoubleStream
dropWhile, takeWhile
-
-
-
-
Constructor Detail
-
DoubleStreamDecorator
public DoubleStreamDecorator(DoubleStream delegate, Runnable closeHandler)
-
-
Method Detail
-
filter
public DoubleStream filter(DoublePredicate predicate)
- Specified by:
filterin interfaceDoubleStream
-
map
public DoubleStream map(DoubleUnaryOperator mapper)
- Specified by:
mapin interfaceDoubleStream
-
mapToObj
public <U> Stream<U> mapToObj(DoubleFunction<? extends U> mapper)
- Specified by:
mapToObjin interfaceDoubleStream
-
mapToInt
public IntStream mapToInt(DoubleToIntFunction mapper)
- Specified by:
mapToIntin interfaceDoubleStream
-
mapToLong
public LongStream mapToLong(DoubleToLongFunction mapper)
- Specified by:
mapToLongin interfaceDoubleStream
-
flatMap
public DoubleStream flatMap(DoubleFunction<? extends DoubleStream> mapper)
- Specified by:
flatMapin interfaceDoubleStream
-
distinct
public DoubleStream distinct()
- Specified by:
distinctin interfaceDoubleStream
-
sorted
public DoubleStream sorted()
- Specified by:
sortedin interfaceDoubleStream
-
peek
public DoubleStream peek(DoubleConsumer action)
- Specified by:
peekin interfaceDoubleStream
-
limit
public DoubleStream limit(long maxSize)
- Specified by:
limitin interfaceDoubleStream
-
skip
public DoubleStream skip(long n)
- Specified by:
skipin interfaceDoubleStream
-
forEach
public void forEach(DoubleConsumer action)
- Specified by:
forEachin interfaceDoubleStream
-
forEachOrdered
public void forEachOrdered(DoubleConsumer action)
- Specified by:
forEachOrderedin interfaceDoubleStream
-
toArray
public double[] toArray()
- Specified by:
toArrayin interfaceDoubleStream
-
reduce
public double reduce(double identity, DoubleBinaryOperator op)- Specified by:
reducein interfaceDoubleStream
-
reduce
public OptionalDouble reduce(DoubleBinaryOperator op)
- Specified by:
reducein interfaceDoubleStream
-
collect
public <R> R collect(Supplier<R> supplier, ObjDoubleConsumer<R> accumulator, BiConsumer<R,R> combiner)
- Specified by:
collectin interfaceDoubleStream
-
sum
public double sum()
- Specified by:
sumin interfaceDoubleStream
-
min
public OptionalDouble min()
- Specified by:
minin interfaceDoubleStream
-
max
public OptionalDouble max()
- Specified by:
maxin interfaceDoubleStream
-
count
public long count()
- Specified by:
countin interfaceDoubleStream
-
average
public OptionalDouble average()
- Specified by:
averagein interfaceDoubleStream
-
summaryStatistics
public DoubleSummaryStatistics summaryStatistics()
- Specified by:
summaryStatisticsin interfaceDoubleStream
-
anyMatch
public boolean anyMatch(DoublePredicate predicate)
- Specified by:
anyMatchin interfaceDoubleStream
-
allMatch
public boolean allMatch(DoublePredicate predicate)
- Specified by:
allMatchin interfaceDoubleStream
-
noneMatch
public boolean noneMatch(DoublePredicate predicate)
- Specified by:
noneMatchin interfaceDoubleStream
-
findFirst
public OptionalDouble findFirst()
- Specified by:
findFirstin interfaceDoubleStream
-
findAny
public OptionalDouble findAny()
- Specified by:
findAnyin interfaceDoubleStream
-
boxed
public Stream<Double> boxed()
- Specified by:
boxedin interfaceDoubleStream
-
sequential
public DoubleStream sequential()
- Specified by:
sequentialin interfaceBaseStream<Double,DoubleStream>- Specified by:
sequentialin interfaceDoubleStream
-
parallel
public DoubleStream parallel()
- Specified by:
parallelin interfaceBaseStream<Double,DoubleStream>- Specified by:
parallelin interfaceDoubleStream
-
unordered
public DoubleStream unordered()
- Specified by:
unorderedin interfaceBaseStream<Double,DoubleStream>
-
onClose
public DoubleStream onClose(Runnable closeHandler)
- Specified by:
onClosein interfaceBaseStream<Double,DoubleStream>
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBaseStream<Double,DoubleStream>
-
iterator
public PrimitiveIterator.OfDouble iterator()
- Specified by:
iteratorin interfaceBaseStream<Double,DoubleStream>- Specified by:
iteratorin interfaceDoubleStream
-
spliterator
public Spliterator.OfDouble spliterator()
- Specified by:
spliteratorin interfaceBaseStream<Double,DoubleStream>- Specified by:
spliteratorin interfaceDoubleStream
-
isParallel
public boolean isParallel()
- Specified by:
isParallelin interfaceBaseStream<Double,DoubleStream>
-
-