Package com.terracottatech.store.async
Interface AsyncIntStream
- All Superinterfaces:
AutoCloseable,BaseStream<Integer,AsyncIntStream>
An asynchronous equivalent to
IntStream.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionallMatch(IntPredicate predicate) An asynchronous equivalent toIntStream.allMatch(java.util.function.IntPredicate).anyMatch(IntPredicate predicate) An asynchronous equivalent toIntStream.anyMatch(java.util.function.IntPredicate).An asynchronous equivalent toIntStream.asDoubleStream().An asynchronous equivalent toIntStream.asLongStream().average()An asynchronous equivalent toIntStream.average().boxed()An asynchronous equivalent toIntStream.boxed().<R> Operation<R>collect(Supplier<R> supplier, ObjIntConsumer<R> accumulator, BiConsumer<R, R> combiner) An asynchronous equivalent toIntStream.collect(java.util.function.Supplier, java.util.function.ObjIntConsumer, java.util.function.BiConsumer).count()An asynchronous equivalent toIntStream.count().distinct()An asynchronous equivalent toIntStream.distinct().filter(IntPredicate predicate) An asynchronous equivalent toIntStream.filter(java.util.function.IntPredicate).findAny()An asynchronous equivalent toIntStream.findAny().An asynchronous equivalent toIntStream.findFirst().flatMap(IntFunction<? extends IntStream> mapper) An asynchronous equivalent toIntStream.flatMap(java.util.function.IntFunction).forEach(IntConsumer action) An asynchronous equivalent toIntStream.forEach(java.util.function.IntConsumer).forEachOrdered(IntConsumer action) An asynchronous equivalent toIntStream.forEachOrdered(java.util.function.IntConsumer).iterator()limit(long maxSize) An asynchronous equivalent toIntStream.limit(long).map(IntUnaryOperator mapper) An asynchronous equivalent toIntStream.map(java.util.function.IntUnaryOperator).mapToDouble(IntToDoubleFunction mapper) An asynchronous equivalent toIntStream.mapToDouble(java.util.function.IntToDoubleFunction).mapToLong(IntToLongFunction mapper) An asynchronous equivalent toIntStream.mapToLong(java.util.function.IntToLongFunction).<U> AsyncStream<U>mapToObj(IntFunction<? extends U> mapper) An asynchronous equivalent toIntStream.mapToObj(java.util.function.IntFunction).max()An asynchronous equivalent toIntStream.max().min()An asynchronous equivalent toIntStream.min().noneMatch(IntPredicate predicate) An asynchronous equivalent toIntStream.noneMatch(java.util.function.IntPredicate).parallel()peek(IntConsumer action) An asynchronous equivalent toIntStream.peek(java.util.function.IntConsumer).reduce(int identity, IntBinaryOperator op) An asynchronous equivalent toIntStream.reduce(int, java.util.function.IntBinaryOperator).An asynchronous equivalent toIntStream.reduce(java.util.function.IntBinaryOperator).skip(long n) An asynchronous equivalent toIntStream.skip(long).sorted()An asynchronous equivalent toIntStream.sorted().sum()An asynchronous equivalent toIntStream.sum().An asynchronous equivalent toIntStream.summaryStatistics().Operation<int[]>toArray()An asynchronous equivalent toIntStream.toArray().Methods inherited from interface java.util.stream.BaseStream
close, isParallel, onClose, unordered
-
Method Details
-
filter
An asynchronous equivalent toIntStream.filter(java.util.function.IntPredicate).- Parameters:
predicate- the inclusion predicate- Returns:
- the new stream
-
map
An asynchronous equivalent toIntStream.map(java.util.function.IntUnaryOperator).- Parameters:
mapper- the element mapping function- Returns:
- the new stream
-
mapToObj
An asynchronous equivalent toIntStream.mapToObj(java.util.function.IntFunction).- Type Parameters:
U- the element type of the new stream- Parameters:
mapper- the element mapping function- Returns:
- the new stream
-
mapToLong
An asynchronous equivalent toIntStream.mapToLong(java.util.function.IntToLongFunction).- Parameters:
mapper- the element mapping function- Returns:
- the new stream
-
mapToDouble
An asynchronous equivalent toIntStream.mapToDouble(java.util.function.IntToDoubleFunction).- Parameters:
mapper- the element mapping function- Returns:
- the new stream
-
flatMap
An asynchronous equivalent toIntStream.flatMap(java.util.function.IntFunction).- Parameters:
mapper- the element mapping function- Returns:
- the new stream
-
distinct
AsyncIntStream distinct()An asynchronous equivalent toIntStream.distinct().- Returns:
- the new stream
-
sorted
AsyncIntStream sorted()An asynchronous equivalent toIntStream.sorted().- Returns:
- the new stream
-
peek
An asynchronous equivalent toIntStream.peek(java.util.function.IntConsumer).- Parameters:
action- action to perform on the elements as they are consumed- Returns:
- the new stream
-
limit
An asynchronous equivalent toIntStream.limit(long).- Parameters:
maxSize- maximum number of elements- Returns:
- the new stream
-
skip
An asynchronous equivalent toIntStream.skip(long).- Parameters:
n- number of leading elements to skip- Returns:
- the new stream
-
forEach
An asynchronous equivalent toIntStream.forEach(java.util.function.IntConsumer).- Parameters:
action- action to perform on the elements- Returns:
- an
Operationrepresenting the completion of this action across all elements
-
forEachOrdered
An asynchronous equivalent toIntStream.forEachOrdered(java.util.function.IntConsumer).- Parameters:
action- action to perform on the elements- Returns:
- an
Operationrepresenting the completion of this action across all elements
-
toArray
Operation<int[]> toArray()An asynchronous equivalent toIntStream.toArray().- Returns:
- an
Operationrepresenting the conversion of this stream to an array
-
reduce
An asynchronous equivalent toIntStream.reduce(int, java.util.function.IntBinaryOperator).- Parameters:
identity- identity value of the accumulating operatorop- the accumulating operator- Returns:
- an
Operationrepresenting the execution of this reduction
-
reduce
An asynchronous equivalent toIntStream.reduce(java.util.function.IntBinaryOperator).- Parameters:
op- the accumulating operator- Returns:
- an
Operationrepresenting the execution of this reduction
-
collect
<R> Operation<R> collect(Supplier<R> supplier, ObjIntConsumer<R> accumulator, BiConsumer<R, R> combiner) An asynchronous equivalent toIntStream.collect(java.util.function.Supplier, java.util.function.ObjIntConsumer, java.util.function.BiConsumer).- Type Parameters:
R- the type of the result- Parameters:
supplier- the result container supplieraccumulator- the accumulating functioncombiner- the combining function- Returns:
- an
Operationrepresenting the execution of this reduction
-
sum
An asynchronous equivalent toIntStream.sum().- Returns:
- an
Operationrepresenting the sum of all elements
-
min
Operation<OptionalInt> min()An asynchronous equivalent toIntStream.min().- Returns:
- an
Operationrepresenting the calculation of the minimum value
-
max
Operation<OptionalInt> max()An asynchronous equivalent toIntStream.max().- Returns:
- an
Operationrepresenting the calculation of the maximum value
-
count
An asynchronous equivalent toIntStream.count().- Returns:
- an
Operationrepresenting the length of the stream
-
average
Operation<OptionalDouble> average()An asynchronous equivalent toIntStream.average().- Returns:
- an
Operationrepresenting the calculation of the average of all elements
-
summaryStatistics
Operation<IntSummaryStatistics> summaryStatistics()An asynchronous equivalent toIntStream.summaryStatistics().- Returns:
- an
Operationrepresenting the calculation of statistics for this stream.
-
anyMatch
An asynchronous equivalent toIntStream.anyMatch(java.util.function.IntPredicate).- Parameters:
predicate- predicate to apply to the elements in the stream- Returns:
- an
Operationreturningtrueif at least one elements satisfies the predicate
-
allMatch
An asynchronous equivalent toIntStream.allMatch(java.util.function.IntPredicate).- Parameters:
predicate- predicate to apply to the elements in the stream- Returns:
- an
Operationreturningtrueif all the elements satisfy the predicate
-
noneMatch
An asynchronous equivalent toIntStream.noneMatch(java.util.function.IntPredicate).- Parameters:
predicate- predicate to apply to the elements in the stream- Returns:
- an
Operationreturningtrueif none of the elements satisfy the predicate
-
findFirst
Operation<OptionalInt> findFirst()An asynchronous equivalent toIntStream.findFirst().- Returns:
- an
Operationreturning the first element of the stream
-
findAny
Operation<OptionalInt> findAny()An asynchronous equivalent toIntStream.findAny().- Returns:
- an
Operationreturning an element of the stream
-
asLongStream
AsyncLongStream asLongStream()An asynchronous equivalent toIntStream.asLongStream().- Returns:
- an
AsyncLongStreamcontaining these values converted to longs
-
asDoubleStream
AsyncDoubleStream asDoubleStream()An asynchronous equivalent toIntStream.asDoubleStream().- Returns:
- an
AsyncDoubleStreamcontaining these values converted to doubles
-
boxed
AsyncStream<Integer> boxed()An asynchronous equivalent toIntStream.boxed().- Returns:
- an
AsyncStreamcontaining boxed versions of this streams values
-
sequential
AsyncIntStream sequential()- Specified by:
sequentialin interfaceBaseStream<Integer,AsyncIntStream>
-
parallel
AsyncIntStream parallel()- Specified by:
parallelin interfaceBaseStream<Integer,AsyncIntStream>
-
iterator
PrimitiveIterator.OfInt iterator()- Specified by:
iteratorin interfaceBaseStream<Integer,AsyncIntStream>
-
spliterator
Spliterator.OfInt spliterator()- Specified by:
spliteratorin interfaceBaseStream<Integer,AsyncIntStream>
-