Package com.terracottatech.store.async
Interface AsyncDoubleStream
- All Superinterfaces:
AutoCloseable,BaseStream<Double,AsyncDoubleStream>
An asynchronous equivalent to
DoubleStream.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionallMatch(DoublePredicate predicate) An asynchronous equivalent toDoubleStream.allMatch(java.util.function.DoublePredicate).anyMatch(DoublePredicate predicate) An asynchronous equivalent toDoubleStream.anyMatch(java.util.function.DoublePredicate).average()An asynchronous equivalent toDoubleStream.average().boxed()An asynchronous equivalent toDoubleStream.boxed().<R> Operation<R>collect(Supplier<R> supplier, ObjDoubleConsumer<R> accumulator, BiConsumer<R, R> combiner) An asynchronous equivalent toDoubleStream.collect(java.util.function.Supplier, java.util.function.ObjDoubleConsumer, java.util.function.BiConsumer).count()An asynchronous equivalent toDoubleStream.count().distinct()An asynchronous equivalent toDoubleStream.distinct().filter(DoublePredicate predicate) An asynchronous equivalent toDoubleStream.filter(java.util.function.DoublePredicate).findAny()An asynchronous equivalent toDoubleStream.findAny().An asynchronous equivalent toDoubleStream.findFirst().flatMap(DoubleFunction<? extends DoubleStream> mapper) An asynchronous equivalent toDoubleStream.flatMap(java.util.function.DoubleFunction).forEach(DoubleConsumer action) An asynchronous equivalent toDoubleStream.forEach(java.util.function.DoubleConsumer).forEachOrdered(DoubleConsumer action) An asynchronous equivalent toDoubleStream.forEachOrdered(java.util.function.DoubleConsumer).iterator()limit(long maxSize) An asynchronous equivalent toDoubleStream.limit(long).map(DoubleUnaryOperator mapper) An asynchronous equivalent toDoubleStream.map(java.util.function.DoubleUnaryOperator).mapToInt(DoubleToIntFunction mapper) An asynchronous equivalent toDoubleStream.mapToInt(java.util.function.DoubleToIntFunction).mapToLong(DoubleToLongFunction mapper) An asynchronous equivalent toDoubleStream.mapToLong(java.util.function.DoubleToLongFunction).<U> AsyncStream<U>mapToObj(DoubleFunction<? extends U> mapper) An asynchronous equivalent toDoubleStream.mapToObj(java.util.function.DoubleFunction).max()An asynchronous equivalent toDoubleStream.max().min()An asynchronous equivalent toDoubleStream.min().noneMatch(DoublePredicate predicate) An asynchronous equivalent toDoubleStream.noneMatch(java.util.function.DoublePredicate).parallel()peek(DoubleConsumer action) An asynchronous equivalent toDoubleStream.peek(java.util.function.DoubleConsumer).reduce(double identity, DoubleBinaryOperator op) An asynchronous equivalent toDoubleStream.reduce(double, java.util.function.DoubleBinaryOperator).An asynchronous equivalent toDoubleStream.reduce(java.util.function.DoubleBinaryOperator).skip(long n) An asynchronous equivalent toDoubleStream.skip(long).sorted()An asynchronous equivalent toDoubleStream.sorted().sum()An asynchronous equivalent toDoubleStream.sum().An asynchronous equivalent toDoubleStream.summaryStatistics().Operation<double[]>toArray()An asynchronous equivalent toDoubleStream.toArray().Methods inherited from interface java.util.stream.BaseStream
close, isParallel, onClose, unordered
-
Method Details
-
filter
An asynchronous equivalent toDoubleStream.filter(java.util.function.DoublePredicate).- Parameters:
predicate- the inclusion predicate- Returns:
- the new stream
-
map
An asynchronous equivalent toDoubleStream.map(java.util.function.DoubleUnaryOperator).- Parameters:
mapper- the element mapping function- Returns:
- the new stream
-
mapToObj
An asynchronous equivalent toDoubleStream.mapToObj(java.util.function.DoubleFunction).- Type Parameters:
U- the element type of the new stream- Parameters:
mapper- the element mapping function- Returns:
- the new stream
-
mapToInt
An asynchronous equivalent toDoubleStream.mapToInt(java.util.function.DoubleToIntFunction).- Parameters:
mapper- the element mapping function- Returns:
- the new stream
-
mapToLong
An asynchronous equivalent toDoubleStream.mapToLong(java.util.function.DoubleToLongFunction).- Parameters:
mapper- the element mapping function- Returns:
- the new stream
-
flatMap
An asynchronous equivalent toDoubleStream.flatMap(java.util.function.DoubleFunction).- Parameters:
mapper- the element mapping function- Returns:
- the new stream
-
distinct
AsyncDoubleStream distinct()An asynchronous equivalent toDoubleStream.distinct().- Returns:
- the new stream
-
sorted
AsyncDoubleStream sorted()An asynchronous equivalent toDoubleStream.sorted().- Returns:
- the new stream
-
peek
An asynchronous equivalent toDoubleStream.peek(java.util.function.DoubleConsumer).- Parameters:
action- action to perform on the elements as they are consumed- Returns:
- the new stream
-
limit
An asynchronous equivalent toDoubleStream.limit(long).- Parameters:
maxSize- maximum number of elements- Returns:
- the new stream
-
skip
An asynchronous equivalent toDoubleStream.skip(long).- Parameters:
n- number of leading elements to skip- Returns:
- the new stream
-
forEach
An asynchronous equivalent toDoubleStream.forEach(java.util.function.DoubleConsumer).- Parameters:
action- action to perform on the elements- Returns:
- an
Operationrepresenting the completion of this action across all elements
-
forEachOrdered
An asynchronous equivalent toDoubleStream.forEachOrdered(java.util.function.DoubleConsumer).- Parameters:
action- action to perform on the elements- Returns:
- an
Operationrepresenting the completion of this action across all elements
-
toArray
Operation<double[]> toArray()An asynchronous equivalent toDoubleStream.toArray().- Returns:
- an
Operationrepresenting the conversion of this stream to an array
-
reduce
An asynchronous equivalent toDoubleStream.reduce(double, java.util.function.DoubleBinaryOperator).- Parameters:
identity- identity value of the accumulating operatorop- the accumulating operator- Returns:
- an
Operationrepresenting the execution of this reduction
-
reduce
An asynchronous equivalent toDoubleStream.reduce(java.util.function.DoubleBinaryOperator).- Parameters:
op- the accumulating operator- Returns:
- an
Operationrepresenting the execution of this reduction
-
collect
<R> Operation<R> collect(Supplier<R> supplier, ObjDoubleConsumer<R> accumulator, BiConsumer<R, R> combiner) An asynchronous equivalent toDoubleStream.collect(java.util.function.Supplier, java.util.function.ObjDoubleConsumer, 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 toDoubleStream.sum().- Returns:
- an
Operationrepresenting the sum of all elements
-
min
Operation<OptionalDouble> min()An asynchronous equivalent toDoubleStream.min().- Returns:
- an
Operationrepresenting the calculation of the minimum value
-
max
Operation<OptionalDouble> max()An asynchronous equivalent toDoubleStream.max().- Returns:
- an
Operationrepresenting the calculation of the maximum value
-
count
An asynchronous equivalent toDoubleStream.count().- Returns:
- an
Operationrepresenting the length of the stream
-
average
Operation<OptionalDouble> average()An asynchronous equivalent toDoubleStream.average().- Returns:
- an
Operationrepresenting the calculation of the average of all elements
-
summaryStatistics
Operation<DoubleSummaryStatistics> summaryStatistics()An asynchronous equivalent toDoubleStream.summaryStatistics().- Returns:
- an
Operationrepresenting the calculation of statistics for this stream.
-
anyMatch
An asynchronous equivalent toDoubleStream.anyMatch(java.util.function.DoublePredicate).- 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 toDoubleStream.allMatch(java.util.function.DoublePredicate).- Parameters:
predicate- predicate to apply to the elements in the stream- Returns:
- an
Operationreturningtrueif all the elements satisfy the predicate
-
noneMatch
An asynchronous equivalent toDoubleStream.noneMatch(java.util.function.DoublePredicate).- Parameters:
predicate- predicate to apply to the elements in the stream- Returns:
- an
Operationreturningtrueif none of the elements satisfy the predicate
-
findFirst
Operation<OptionalDouble> findFirst()An asynchronous equivalent toDoubleStream.findFirst().- Returns:
- an
Operationreturning the first element of the stream
-
findAny
Operation<OptionalDouble> findAny()An asynchronous equivalent toDoubleStream.findAny().- Returns:
- an
Operationreturning an element of the stream
-
boxed
AsyncStream<Double> boxed()An asynchronous equivalent toDoubleStream.boxed().- Returns:
- an
AsyncStreamcontaining boxed versions of this streams values
-
sequential
AsyncDoubleStream sequential()- Specified by:
sequentialin interfaceBaseStream<Double,AsyncDoubleStream>
-
parallel
AsyncDoubleStream parallel()- Specified by:
parallelin interfaceBaseStream<Double,AsyncDoubleStream>
-
iterator
PrimitiveIterator.OfDouble iterator()- Specified by:
iteratorin interfaceBaseStream<Double,AsyncDoubleStream>
-
spliterator
Spliterator.OfDouble spliterator()- Specified by:
spliteratorin interfaceBaseStream<Double,AsyncDoubleStream>
-