Package org.hibernate.query.spi
Class IntStreamDecorator
- java.lang.Object
-
- org.hibernate.query.spi.IntStreamDecorator
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.util.stream.BaseStream<java.lang.Integer,java.util.stream.IntStream>,java.util.stream.IntStream
public class IntStreamDecorator extends java.lang.Object implements java.util.stream.IntStreamTheIntStreamDecoratorwraps a JavaIntStreamand registers acloseHandlerwhich is passed further to any resultingStream.The goal of the
IntStreamDecoratoris to close the underlyingIntStreamupon calling a terminal operation.- Since:
- 5.4
-
-
Constructor Summary
Constructors Constructor Description IntStreamDecorator(java.util.stream.IntStream delegate, java.lang.Runnable closeHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallMatch(java.util.function.IntPredicate predicate)booleananyMatch(java.util.function.IntPredicate predicate)java.util.stream.DoubleStreamasDoubleStream()java.util.stream.LongStreamasLongStream()java.util.OptionalDoubleaverage()java.util.stream.Stream<java.lang.Integer>boxed()voidclose()<R> Rcollect(java.util.function.Supplier<R> supplier, java.util.function.ObjIntConsumer<R> accumulator, java.util.function.BiConsumer<R,R> combiner)longcount()java.util.stream.IntStreamdistinct()java.util.stream.IntStreamfilter(java.util.function.IntPredicate predicate)java.util.OptionalIntfindAny()java.util.OptionalIntfindFirst()java.util.stream.IntStreamflatMap(java.util.function.IntFunction<? extends java.util.stream.IntStream> mapper)voidforEach(java.util.function.IntConsumer action)voidforEachOrdered(java.util.function.IntConsumer action)booleanisParallel()java.util.PrimitiveIterator.OfIntiterator()java.util.stream.IntStreamlimit(long maxSize)java.util.stream.IntStreammap(java.util.function.IntUnaryOperator mapper)java.util.stream.DoubleStreammapToDouble(java.util.function.IntToDoubleFunction mapper)java.util.stream.LongStreammapToLong(java.util.function.IntToLongFunction mapper)<U> java.util.stream.Stream<U>mapToObj(java.util.function.IntFunction<? extends U> mapper)java.util.OptionalIntmax()java.util.OptionalIntmin()booleannoneMatch(java.util.function.IntPredicate predicate)java.util.stream.IntStreamonClose(java.lang.Runnable closeHandler)java.util.stream.IntStreamparallel()java.util.stream.IntStreampeek(java.util.function.IntConsumer action)intreduce(int identity, java.util.function.IntBinaryOperator op)java.util.OptionalIntreduce(java.util.function.IntBinaryOperator op)java.util.stream.IntStreamsequential()java.util.stream.IntStreamskip(long n)java.util.stream.IntStreamsorted()java.util.Spliterator.OfIntspliterator()intsum()java.util.IntSummaryStatisticssummaryStatistics()int[]toArray()java.util.stream.IntStreamunordered()
-
-
-
Method Detail
-
filter
public java.util.stream.IntStream filter(java.util.function.IntPredicate predicate)
- Specified by:
filterin interfacejava.util.stream.IntStream
-
map
public java.util.stream.IntStream map(java.util.function.IntUnaryOperator mapper)
- Specified by:
mapin interfacejava.util.stream.IntStream
-
mapToObj
public <U> java.util.stream.Stream<U> mapToObj(java.util.function.IntFunction<? extends U> mapper)
- Specified by:
mapToObjin interfacejava.util.stream.IntStream
-
mapToLong
public java.util.stream.LongStream mapToLong(java.util.function.IntToLongFunction mapper)
- Specified by:
mapToLongin interfacejava.util.stream.IntStream
-
mapToDouble
public java.util.stream.DoubleStream mapToDouble(java.util.function.IntToDoubleFunction mapper)
- Specified by:
mapToDoublein interfacejava.util.stream.IntStream
-
flatMap
public java.util.stream.IntStream flatMap(java.util.function.IntFunction<? extends java.util.stream.IntStream> mapper)
- Specified by:
flatMapin interfacejava.util.stream.IntStream
-
distinct
public java.util.stream.IntStream distinct()
- Specified by:
distinctin interfacejava.util.stream.IntStream
-
sorted
public java.util.stream.IntStream sorted()
- Specified by:
sortedin interfacejava.util.stream.IntStream
-
peek
public java.util.stream.IntStream peek(java.util.function.IntConsumer action)
- Specified by:
peekin interfacejava.util.stream.IntStream
-
limit
public java.util.stream.IntStream limit(long maxSize)
- Specified by:
limitin interfacejava.util.stream.IntStream
-
skip
public java.util.stream.IntStream skip(long n)
- Specified by:
skipin interfacejava.util.stream.IntStream
-
forEach
public void forEach(java.util.function.IntConsumer action)
- Specified by:
forEachin interfacejava.util.stream.IntStream
-
forEachOrdered
public void forEachOrdered(java.util.function.IntConsumer action)
- Specified by:
forEachOrderedin interfacejava.util.stream.IntStream
-
toArray
public int[] toArray()
- Specified by:
toArrayin interfacejava.util.stream.IntStream
-
reduce
public int reduce(int identity, java.util.function.IntBinaryOperator op)- Specified by:
reducein interfacejava.util.stream.IntStream
-
reduce
public java.util.OptionalInt reduce(java.util.function.IntBinaryOperator op)
- Specified by:
reducein interfacejava.util.stream.IntStream
-
collect
public <R> R collect(java.util.function.Supplier<R> supplier, java.util.function.ObjIntConsumer<R> accumulator, java.util.function.BiConsumer<R,R> combiner)- Specified by:
collectin interfacejava.util.stream.IntStream
-
sum
public int sum()
- Specified by:
sumin interfacejava.util.stream.IntStream
-
min
public java.util.OptionalInt min()
- Specified by:
minin interfacejava.util.stream.IntStream
-
max
public java.util.OptionalInt max()
- Specified by:
maxin interfacejava.util.stream.IntStream
-
count
public long count()
- Specified by:
countin interfacejava.util.stream.IntStream
-
average
public java.util.OptionalDouble average()
- Specified by:
averagein interfacejava.util.stream.IntStream
-
summaryStatistics
public java.util.IntSummaryStatistics summaryStatistics()
- Specified by:
summaryStatisticsin interfacejava.util.stream.IntStream
-
anyMatch
public boolean anyMatch(java.util.function.IntPredicate predicate)
- Specified by:
anyMatchin interfacejava.util.stream.IntStream
-
allMatch
public boolean allMatch(java.util.function.IntPredicate predicate)
- Specified by:
allMatchin interfacejava.util.stream.IntStream
-
noneMatch
public boolean noneMatch(java.util.function.IntPredicate predicate)
- Specified by:
noneMatchin interfacejava.util.stream.IntStream
-
findFirst
public java.util.OptionalInt findFirst()
- Specified by:
findFirstin interfacejava.util.stream.IntStream
-
findAny
public java.util.OptionalInt findAny()
- Specified by:
findAnyin interfacejava.util.stream.IntStream
-
asLongStream
public java.util.stream.LongStream asLongStream()
- Specified by:
asLongStreamin interfacejava.util.stream.IntStream
-
asDoubleStream
public java.util.stream.DoubleStream asDoubleStream()
- Specified by:
asDoubleStreamin interfacejava.util.stream.IntStream
-
boxed
public java.util.stream.Stream<java.lang.Integer> boxed()
- Specified by:
boxedin interfacejava.util.stream.IntStream
-
sequential
public java.util.stream.IntStream sequential()
- Specified by:
sequentialin interfacejava.util.stream.BaseStream<java.lang.Integer,java.util.stream.IntStream>- Specified by:
sequentialin interfacejava.util.stream.IntStream
-
parallel
public java.util.stream.IntStream parallel()
- Specified by:
parallelin interfacejava.util.stream.BaseStream<java.lang.Integer,java.util.stream.IntStream>- Specified by:
parallelin interfacejava.util.stream.IntStream
-
unordered
public java.util.stream.IntStream unordered()
- Specified by:
unorderedin interfacejava.util.stream.BaseStream<java.lang.Integer,java.util.stream.IntStream>
-
onClose
public java.util.stream.IntStream onClose(java.lang.Runnable closeHandler)
- Specified by:
onClosein interfacejava.util.stream.BaseStream<java.lang.Integer,java.util.stream.IntStream>
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.util.stream.BaseStream<java.lang.Integer,java.util.stream.IntStream>
-
iterator
public java.util.PrimitiveIterator.OfInt iterator()
- Specified by:
iteratorin interfacejava.util.stream.BaseStream<java.lang.Integer,java.util.stream.IntStream>- Specified by:
iteratorin interfacejava.util.stream.IntStream
-
spliterator
public java.util.Spliterator.OfInt spliterator()
- Specified by:
spliteratorin interfacejava.util.stream.BaseStream<java.lang.Integer,java.util.stream.IntStream>- Specified by:
spliteratorin interfacejava.util.stream.IntStream
-
isParallel
public boolean isParallel()
- Specified by:
isParallelin interfacejava.util.stream.BaseStream<java.lang.Integer,java.util.stream.IntStream>
-
-