Package org.hibernate.query.spi
Class DoubleStreamDecorator
- java.lang.Object
-
- org.hibernate.query.spi.DoubleStreamDecorator
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.util.stream.BaseStream<java.lang.Double,java.util.stream.DoubleStream>,java.util.stream.DoubleStream
public class DoubleStreamDecorator extends java.lang.Object implements java.util.stream.DoubleStreamTheDoubleStreamDecoratorwraps 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
-
-
Constructor Summary
Constructors Constructor Description DoubleStreamDecorator(java.util.stream.DoubleStream delegate, java.lang.Runnable closeHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallMatch(java.util.function.DoublePredicate predicate)booleananyMatch(java.util.function.DoublePredicate predicate)java.util.OptionalDoubleaverage()java.util.stream.Stream<java.lang.Double>boxed()voidclose()<R> Rcollect(java.util.function.Supplier<R> supplier, java.util.function.ObjDoubleConsumer<R> accumulator, java.util.function.BiConsumer<R,R> combiner)longcount()java.util.stream.DoubleStreamdistinct()java.util.stream.DoubleStreamfilter(java.util.function.DoublePredicate predicate)java.util.OptionalDoublefindAny()java.util.OptionalDoublefindFirst()java.util.stream.DoubleStreamflatMap(java.util.function.DoubleFunction<? extends java.util.stream.DoubleStream> mapper)voidforEach(java.util.function.DoubleConsumer action)voidforEachOrdered(java.util.function.DoubleConsumer action)booleanisParallel()java.util.PrimitiveIterator.OfDoubleiterator()java.util.stream.DoubleStreamlimit(long maxSize)java.util.stream.DoubleStreammap(java.util.function.DoubleUnaryOperator mapper)java.util.stream.IntStreammapToInt(java.util.function.DoubleToIntFunction mapper)java.util.stream.LongStreammapToLong(java.util.function.DoubleToLongFunction mapper)<U> java.util.stream.Stream<U>mapToObj(java.util.function.DoubleFunction<? extends U> mapper)java.util.OptionalDoublemax()java.util.OptionalDoublemin()booleannoneMatch(java.util.function.DoublePredicate predicate)java.util.stream.DoubleStreamonClose(java.lang.Runnable closeHandler)java.util.stream.DoubleStreamparallel()java.util.stream.DoubleStreampeek(java.util.function.DoubleConsumer action)doublereduce(double identity, java.util.function.DoubleBinaryOperator op)java.util.OptionalDoublereduce(java.util.function.DoubleBinaryOperator op)java.util.stream.DoubleStreamsequential()java.util.stream.DoubleStreamskip(long n)java.util.stream.DoubleStreamsorted()java.util.Spliterator.OfDoublespliterator()doublesum()java.util.DoubleSummaryStatisticssummaryStatistics()double[]toArray()java.util.stream.DoubleStreamunordered()
-
-
-
Method Detail
-
filter
public java.util.stream.DoubleStream filter(java.util.function.DoublePredicate predicate)
- Specified by:
filterin interfacejava.util.stream.DoubleStream
-
map
public java.util.stream.DoubleStream map(java.util.function.DoubleUnaryOperator mapper)
- Specified by:
mapin interfacejava.util.stream.DoubleStream
-
mapToObj
public <U> java.util.stream.Stream<U> mapToObj(java.util.function.DoubleFunction<? extends U> mapper)
- Specified by:
mapToObjin interfacejava.util.stream.DoubleStream
-
mapToInt
public java.util.stream.IntStream mapToInt(java.util.function.DoubleToIntFunction mapper)
- Specified by:
mapToIntin interfacejava.util.stream.DoubleStream
-
mapToLong
public java.util.stream.LongStream mapToLong(java.util.function.DoubleToLongFunction mapper)
- Specified by:
mapToLongin interfacejava.util.stream.DoubleStream
-
flatMap
public java.util.stream.DoubleStream flatMap(java.util.function.DoubleFunction<? extends java.util.stream.DoubleStream> mapper)
- Specified by:
flatMapin interfacejava.util.stream.DoubleStream
-
distinct
public java.util.stream.DoubleStream distinct()
- Specified by:
distinctin interfacejava.util.stream.DoubleStream
-
sorted
public java.util.stream.DoubleStream sorted()
- Specified by:
sortedin interfacejava.util.stream.DoubleStream
-
peek
public java.util.stream.DoubleStream peek(java.util.function.DoubleConsumer action)
- Specified by:
peekin interfacejava.util.stream.DoubleStream
-
limit
public java.util.stream.DoubleStream limit(long maxSize)
- Specified by:
limitin interfacejava.util.stream.DoubleStream
-
skip
public java.util.stream.DoubleStream skip(long n)
- Specified by:
skipin interfacejava.util.stream.DoubleStream
-
forEach
public void forEach(java.util.function.DoubleConsumer action)
- Specified by:
forEachin interfacejava.util.stream.DoubleStream
-
forEachOrdered
public void forEachOrdered(java.util.function.DoubleConsumer action)
- Specified by:
forEachOrderedin interfacejava.util.stream.DoubleStream
-
toArray
public double[] toArray()
- Specified by:
toArrayin interfacejava.util.stream.DoubleStream
-
reduce
public double reduce(double identity, java.util.function.DoubleBinaryOperator op)- Specified by:
reducein interfacejava.util.stream.DoubleStream
-
reduce
public java.util.OptionalDouble reduce(java.util.function.DoubleBinaryOperator op)
- Specified by:
reducein interfacejava.util.stream.DoubleStream
-
collect
public <R> R collect(java.util.function.Supplier<R> supplier, java.util.function.ObjDoubleConsumer<R> accumulator, java.util.function.BiConsumer<R,R> combiner)- Specified by:
collectin interfacejava.util.stream.DoubleStream
-
sum
public double sum()
- Specified by:
sumin interfacejava.util.stream.DoubleStream
-
min
public java.util.OptionalDouble min()
- Specified by:
minin interfacejava.util.stream.DoubleStream
-
max
public java.util.OptionalDouble max()
- Specified by:
maxin interfacejava.util.stream.DoubleStream
-
count
public long count()
- Specified by:
countin interfacejava.util.stream.DoubleStream
-
average
public java.util.OptionalDouble average()
- Specified by:
averagein interfacejava.util.stream.DoubleStream
-
summaryStatistics
public java.util.DoubleSummaryStatistics summaryStatistics()
- Specified by:
summaryStatisticsin interfacejava.util.stream.DoubleStream
-
anyMatch
public boolean anyMatch(java.util.function.DoublePredicate predicate)
- Specified by:
anyMatchin interfacejava.util.stream.DoubleStream
-
allMatch
public boolean allMatch(java.util.function.DoublePredicate predicate)
- Specified by:
allMatchin interfacejava.util.stream.DoubleStream
-
noneMatch
public boolean noneMatch(java.util.function.DoublePredicate predicate)
- Specified by:
noneMatchin interfacejava.util.stream.DoubleStream
-
findFirst
public java.util.OptionalDouble findFirst()
- Specified by:
findFirstin interfacejava.util.stream.DoubleStream
-
findAny
public java.util.OptionalDouble findAny()
- Specified by:
findAnyin interfacejava.util.stream.DoubleStream
-
boxed
public java.util.stream.Stream<java.lang.Double> boxed()
- Specified by:
boxedin interfacejava.util.stream.DoubleStream
-
sequential
public java.util.stream.DoubleStream sequential()
- Specified by:
sequentialin interfacejava.util.stream.BaseStream<java.lang.Double,java.util.stream.DoubleStream>- Specified by:
sequentialin interfacejava.util.stream.DoubleStream
-
parallel
public java.util.stream.DoubleStream parallel()
- Specified by:
parallelin interfacejava.util.stream.BaseStream<java.lang.Double,java.util.stream.DoubleStream>- Specified by:
parallelin interfacejava.util.stream.DoubleStream
-
unordered
public java.util.stream.DoubleStream unordered()
- Specified by:
unorderedin interfacejava.util.stream.BaseStream<java.lang.Double,java.util.stream.DoubleStream>
-
onClose
public java.util.stream.DoubleStream onClose(java.lang.Runnable closeHandler)
- Specified by:
onClosein interfacejava.util.stream.BaseStream<java.lang.Double,java.util.stream.DoubleStream>
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.util.stream.BaseStream<java.lang.Double,java.util.stream.DoubleStream>
-
iterator
public java.util.PrimitiveIterator.OfDouble iterator()
- Specified by:
iteratorin interfacejava.util.stream.BaseStream<java.lang.Double,java.util.stream.DoubleStream>- Specified by:
iteratorin interfacejava.util.stream.DoubleStream
-
spliterator
public java.util.Spliterator.OfDouble spliterator()
- Specified by:
spliteratorin interfacejava.util.stream.BaseStream<java.lang.Double,java.util.stream.DoubleStream>- Specified by:
spliteratorin interfacejava.util.stream.DoubleStream
-
isParallel
public boolean isParallel()
- Specified by:
isParallelin interfacejava.util.stream.BaseStream<java.lang.Double,java.util.stream.DoubleStream>
-
-