Package com.terracottatech.store.async
Interface AsyncLongStream
- All Superinterfaces:
AutoCloseable
,BaseStream<Long,
AsyncLongStream>
An asynchronous equivalent to
LongStream
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionallMatch
(LongPredicate predicate) An asynchronous equivalent toLongStream.allMatch(java.util.function.LongPredicate)
.anyMatch
(LongPredicate predicate) An asynchronous equivalent toLongStream.anyMatch(java.util.function.LongPredicate)
.An asynchronous equivalent toLongStream.asDoubleStream()
.average()
An asynchronous equivalent toLongStream.average()
.boxed()
An asynchronous equivalent toLongStream.boxed()
.<R> Operation<R>
collect
(Supplier<R> supplier, ObjLongConsumer<R> accumulator, BiConsumer<R, R> combiner) An asynchronous equivalent toLongStream.collect(java.util.function.Supplier, java.util.function.ObjLongConsumer, java.util.function.BiConsumer)
.count()
An asynchronous equivalent toLongStream.count()
.distinct()
An asynchronous equivalent toLongStream.distinct()
.filter
(LongPredicate predicate) An asynchronous equivalent toLongStream.filter(java.util.function.LongPredicate)
.findAny()
An asynchronous equivalent toLongStream.findAny()
.An asynchronous equivalent toLongStream.findFirst()
.flatMap
(LongFunction<? extends LongStream> mapper) An asynchronous equivalent toLongStream.flatMap(java.util.function.LongFunction)
.forEach
(LongConsumer action) An asynchronous equivalent toLongStream.forEach(java.util.function.LongConsumer)
.forEachOrdered
(LongConsumer action) An asynchronous equivalent toLongStream.forEachOrdered(java.util.function.LongConsumer)
.iterator()
limit
(long maxSize) An asynchronous equivalent toLongStream.limit(long)
.map
(LongUnaryOperator mapper) An asynchronous equivalent toLongStream.map(java.util.function.LongUnaryOperator)
.mapToDouble
(LongToDoubleFunction mapper) An asynchronous equivalent toLongStream.mapToDouble(java.util.function.LongToDoubleFunction)
.mapToInt
(LongToIntFunction mapper) An asynchronous equivalent toLongStream.mapToInt(java.util.function.LongToIntFunction)
.<U> AsyncStream<U>
mapToObj
(LongFunction<? extends U> mapper) An asynchronous equivalent toLongStream.mapToObj(java.util.function.LongFunction)
.max()
An asynchronous equivalent toLongStream.max()
.min()
An asynchronous equivalent toLongStream.min()
.noneMatch
(LongPredicate predicate) An asynchronous equivalent toLongStream.noneMatch(java.util.function.LongPredicate)
.parallel()
peek
(LongConsumer action) An asynchronous equivalent toLongStream.peek(java.util.function.LongConsumer)
.reduce
(long identity, LongBinaryOperator op) An asynchronous equivalent toLongStream.reduce(long, java.util.function.LongBinaryOperator)
.An asynchronous equivalent toLongStream.reduce(java.util.function.LongBinaryOperator)
.skip
(long n) An asynchronous equivalent toLongStream.skip(long)
.sorted()
An asynchronous equivalent toLongStream.sorted()
.sum()
An asynchronous equivalent toLongStream.sum()
.An asynchronous equivalent toLongStream.summaryStatistics()
.Operation<long[]>
toArray()
An asynchronous equivalent toLongStream.toArray()
.Methods inherited from interface java.util.stream.BaseStream
close, isParallel, onClose, unordered
-
Method Details
-
filter
An asynchronous equivalent toLongStream.filter(java.util.function.LongPredicate)
.- Parameters:
predicate
- the inclusion predicate- Returns:
- the new stream
-
map
An asynchronous equivalent toLongStream.map(java.util.function.LongUnaryOperator)
.- Parameters:
mapper
- the element mapping function- Returns:
- the new stream
-
mapToObj
An asynchronous equivalent toLongStream.mapToObj(java.util.function.LongFunction)
.- Type Parameters:
U
- the element type of the new stream- Parameters:
mapper
- the element mapping function- Returns:
- the new stream
-
mapToInt
An asynchronous equivalent toLongStream.mapToInt(java.util.function.LongToIntFunction)
.- Parameters:
mapper
- the element mapping function- Returns:
- the new stream
-
mapToDouble
An asynchronous equivalent toLongStream.mapToDouble(java.util.function.LongToDoubleFunction)
.- Parameters:
mapper
- the element mapping function- Returns:
- the new stream
-
flatMap
An asynchronous equivalent toLongStream.flatMap(java.util.function.LongFunction)
.- Parameters:
mapper
- the element mapping function- Returns:
- the new stream
-
distinct
AsyncLongStream distinct()An asynchronous equivalent toLongStream.distinct()
.- Returns:
- the new stream
-
sorted
AsyncLongStream sorted()An asynchronous equivalent toLongStream.sorted()
.- Returns:
- the new stream
-
peek
An asynchronous equivalent toLongStream.peek(java.util.function.LongConsumer)
.- Parameters:
action
- action to perform on the elements as they are consumed- Returns:
- the new stream
-
limit
An asynchronous equivalent toLongStream.limit(long)
.- Parameters:
maxSize
- maximum number of elements- Returns:
- the new stream
-
skip
An asynchronous equivalent toLongStream.skip(long)
.- Parameters:
n
- number of leading elements to skip- Returns:
- the new stream
-
forEach
An asynchronous equivalent toLongStream.forEach(java.util.function.LongConsumer)
.- Parameters:
action
- action to perform on the elements- Returns:
- an
Operation
representing the completion of this action across all elements
-
forEachOrdered
An asynchronous equivalent toLongStream.forEachOrdered(java.util.function.LongConsumer)
.- Parameters:
action
- action to perform on the elements- Returns:
- an
Operation
representing the completion of this action across all elements
-
toArray
Operation<long[]> toArray()An asynchronous equivalent toLongStream.toArray()
.- Returns:
- an
Operation
representing the conversion of this stream to an array
-
reduce
An asynchronous equivalent toLongStream.reduce(long, java.util.function.LongBinaryOperator)
.- Parameters:
identity
- identity value of the accumulating operatorop
- the accumulating operator- Returns:
- an
Operation
representing the execution of this reduction
-
reduce
An asynchronous equivalent toLongStream.reduce(java.util.function.LongBinaryOperator)
.- Parameters:
op
- the accumulating operator- Returns:
- an
Operation
representing the execution of this reduction
-
collect
<R> Operation<R> collect(Supplier<R> supplier, ObjLongConsumer<R> accumulator, BiConsumer<R, R> combiner) An asynchronous equivalent toLongStream.collect(java.util.function.Supplier, java.util.function.ObjLongConsumer, 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
Operation
representing the execution of this reduction
-
sum
An asynchronous equivalent toLongStream.sum()
.- Returns:
- an
Operation
representing the sum of all elements
-
min
Operation<OptionalLong> min()An asynchronous equivalent toLongStream.min()
.- Returns:
- an
Operation
representing the calculation of the minimum value
-
max
Operation<OptionalLong> max()An asynchronous equivalent toLongStream.max()
.- Returns:
- an
Operation
representing the calculation of the maximum value
-
count
An asynchronous equivalent toLongStream.count()
.- Returns:
- an
Operation
representing the length of the stream
-
average
Operation<OptionalDouble> average()An asynchronous equivalent toLongStream.average()
.- Returns:
- an
Operation
representing the calculation of the average of all elements
-
summaryStatistics
Operation<LongSummaryStatistics> summaryStatistics()An asynchronous equivalent toLongStream.summaryStatistics()
.- Returns:
- an
Operation
representing the calculation of statistics for this stream.
-
anyMatch
An asynchronous equivalent toLongStream.anyMatch(java.util.function.LongPredicate)
.- Parameters:
predicate
- predicate to apply to the elements in the stream- Returns:
- an
Operation
returningtrue
if at least one elements satisfies the predicate
-
allMatch
An asynchronous equivalent toLongStream.allMatch(java.util.function.LongPredicate)
.- Parameters:
predicate
- predicate to apply to the elements in the stream- Returns:
- an
Operation
returningtrue
if all the elements satisfy the predicate
-
noneMatch
An asynchronous equivalent toLongStream.noneMatch(java.util.function.LongPredicate)
.- Parameters:
predicate
- predicate to apply to the elements in the stream- Returns:
- an
Operation
returningtrue
if none of the elements satisfy the predicate
-
findFirst
Operation<OptionalLong> findFirst()An asynchronous equivalent toLongStream.findFirst()
.- Returns:
- an
Operation
returning the first element of the stream
-
findAny
Operation<OptionalLong> findAny()An asynchronous equivalent toLongStream.findAny()
.- Returns:
- an
Operation
returning an element of the stream
-
asDoubleStream
AsyncDoubleStream asDoubleStream()An asynchronous equivalent toLongStream.asDoubleStream()
.- Returns:
- an
AsyncDoubleStream
containing these values converted to doubles
-
boxed
AsyncStream<Long> boxed()An asynchronous equivalent toLongStream.boxed()
.- Returns:
- an
AsyncStream
containing boxed versions of this streams values
-
sequential
AsyncLongStream sequential()- Specified by:
sequential
in interfaceBaseStream<Long,
AsyncLongStream>
-
parallel
AsyncLongStream parallel()- Specified by:
parallel
in interfaceBaseStream<Long,
AsyncLongStream>
-
iterator
PrimitiveIterator.OfLong iterator()- Specified by:
iterator
in interfaceBaseStream<Long,
AsyncLongStream>
-
spliterator
Spliterator.OfLong spliterator()- Specified by:
spliterator
in interfaceBaseStream<Long,
AsyncLongStream>
-