T
- the type of the stream elementspublic abstract class Stream<T>
extends java.lang.Object
IntStream
,
LongStream
,
DoubleStream
Modifier and Type | Class and Description |
---|---|
static class |
Stream.LAIO
LAIO = Loading All Intermediate Operations.
|
static class |
Stream.PSO
PSO = Parallel supported Operations.
|
static class |
Stream.SOO
SOO = Sequential Only Operations.
|
static class |
Stream.StreamEx<T> |
BaseStream.Splitor
Modifier and Type | Method and Description |
---|---|
<R> R |
__(Function<? super Stream<T>,R> transfer) |
abstract <E extends java.lang.Exception> |
acceptIfNotEmpty(Try.Consumer<? super Stream<T>,E> action)
The Stream will be closed finally, no matter it's empty or not.
|
abstract <E extends java.lang.Exception> |
allMatch(Try.Predicate<? super T,E> predicate) |
abstract <E extends java.lang.Exception> |
anyMatch(Try.Predicate<? super T,E> predicate) |
abstract Stream<T> |
append(java.util.Collection<? extends T> c) |
Stream<T> |
append(T... a) |
abstract Stream<T> |
appendAlll(java.util.Collection<? extends java.util.Collection<? extends T>> cs) |
abstract Stream<T> |
appendIfEmpty(java.util.Collection<? extends T> c) |
Stream<T> |
appendIfEmpty(T... a) |
abstract <R,E extends java.lang.Exception> |
applyIfNotEmpty(Try.Function<? super Stream<T>,R,E> func)
The Stream will be closed finally, no matter it's empty or not.
|
<R,E extends java.lang.Exception> |
asyncCall(Try.Function<? super Stream<T>,R,E> action) |
<R,E extends java.lang.Exception> |
asyncCall(Try.Function<? super Stream<T>,R,E> action,
java.util.concurrent.Executor executor) |
<E extends java.lang.Exception> |
asyncRun(Try.Consumer<? super Stream<T>,E> action) |
<E extends java.lang.Exception> |
asyncRun(Try.Consumer<? super Stream<T>,E> action,
java.util.concurrent.Executor executor) |
abstract u.OptionalDouble |
averageDouble(ToDoubleFunction<? super T> mapper) |
abstract u.OptionalDouble |
averageInt(ToIntFunction<? super T> mapper) |
abstract u.OptionalDouble |
averageLong(ToLongFunction<? super T> mapper) |
S |
carry(C action)
Same as
peek |
abstract Stream<java.util.List<T>> |
cartesianProduct(java.util.Collection<? extends java.util.Collection<? extends T>> cs) |
Stream<java.util.List<T>> |
cartesianProduct(java.util.Collection<? extends T>... cs) |
void |
close() |
abstract Stream<Stream<T>> |
collapse(BiPredicate<? super T,? super T> collapsible) |
abstract Stream<T> |
collapse(BiPredicate<? super T,? super T> collapsible,
BiFunction<? super T,? super T,T> mergeFunction)
Merge series of adjacent elements which satisfy the given predicate using
the merger function and return a new stream.
|
abstract <R,A> Stream<R> |
collapse(BiPredicate<? super T,? super T> collapsible,
Collector<? super T,A,R> collector)
Merge series of adjacent elements which satisfy the given predicate using
the merger function and return a new stream.
|
abstract <C extends java.util.Collection<T>> |
collapse(BiPredicate<? super T,? super T> collapsible,
Supplier<? extends C> supplier) |
abstract <R> Stream<R> |
collapse(BiPredicate<? super T,? super T> collapsible,
Supplier<R> supplier,
BiConsumer<? super R,? super T> accumulator) |
abstract <U> Stream<U> |
collapse(BiPredicate<? super T,? super T> collapsible,
U init,
BiFunction<U,? super T,U> op) |
abstract <R,A> R |
collect(Collector<? super T,A,R> collector) |
abstract <R,A> R |
collect(java.util.stream.Collector<? super T,A,R> collector) |
abstract <R> R |
collect(Supplier<R> supplier,
BiConsumer<? super R,? super T> accumulator) |
abstract <R> R |
collect(Supplier<R> supplier,
BiConsumer<? super R,? super T> accumulator,
BiConsumer<R,R> combiner) |
abstract <R,A,RR> RR |
collectAndThen(Collector<? super T,A,R> downstream,
Function<? super R,RR> func) |
abstract <R,A,RR> RR |
collectAndThen(java.util.stream.Collector<? super T,A,R> downstream,
java.util.function.Function<? super R,RR> func) |
abstract Stream<java.util.List<T>> |
combinations()
Stream.of(1, 2, 3).combinations().forEach(Fn.println());
// output
[]
[1]
[2]
[3]
[1, 2]
[1, 3]
[2, 3]
[1, 2, 3]
|
abstract Stream<java.util.List<T>> |
combinations(int len)
Stream.of(1, 2, 3).combinations(2).forEach(Fn.println());
// output
[1, 2]
[1, 3]
[2, 3]
|
abstract Stream<java.util.List<T>> |
combinations(int len,
boolean repeat)
It's same as
N.cartesianProduct(N.repeat(toList(), len)) if repeat is true . |
static <T> Stream<T> |
concat(java.util.Collection<? extends Stream<? extends T>> c) |
static <T> Stream<T> |
concat(java.util.Collection<? extends T>... a) |
static <T> Stream<T> |
concat(java.util.Iterator<? extends T>... a) |
static <T> Stream<T> |
concat(Stream<? extends T>... a) |
static <T> Stream<T> |
concat(T[]... a) |
static <T> Stream<T> |
concatt(java.util.Collection<? extends java.util.Iterator<? extends T>> c) |
abstract boolean |
containsAll(java.util.Collection<? extends T> c) |
abstract boolean |
containsAll(T... a) |
<K> Stream<java.util.Map.Entry<K,java.lang.Integer>> |
countBy(Function<? super T,? extends K> keyMapper) |
<K> EntryStream<K,java.lang.Integer> |
countByToEntry(Function<? super T,? extends K> keyMapper) |
abstract Stream<T> |
difference(Function<? super T,?> mapper,
java.util.Collection<?> c)
Except with the specified Collection by the values mapped by
mapper . |
Stream<T> |
distinct(Predicate<? super java.lang.Long> occurrencesFilter)
Distinct and filter by occurrences.
|
abstract Stream<T> |
distinctBy(Function<? super T,?> keyMapper)
Distinct by the value mapped from
keyMapper |
<K> Stream<T> |
distinctBy(Function<? super T,K> keyMapper,
Predicate<? super java.lang.Long> occurrencesFilter)
Distinct and filter by occurrences.
|
static <T> Stream<T> |
empty() |
abstract <E extends java.lang.Exception> |
findAny(Try.Predicate<? super T,E> predicate) |
abstract <E extends java.lang.Exception> |
findFirst(Try.Predicate<? super T,E> predicate) |
abstract <U,E extends java.lang.Exception,E2 extends java.lang.Exception> |
findFirstOrLast(Function<? super T,U> preFunc,
Try.BiPredicate<? super T,? super U,E> predicateForFirst,
Try.BiPredicate<? super T,? super U,E2> predicateForLast)
This method only run sequentially, even in parallel stream. |
abstract <E extends java.lang.Exception,E2 extends java.lang.Exception> |
findFirstOrLast(Try.Predicate<? super T,E> predicateForFirst,
Try.Predicate<? super T,E2> predicateForLast) |
abstract <U,E extends java.lang.Exception,E2 extends java.lang.Exception> |
findFirstOrLast(U init,
Try.BiPredicate<? super T,? super U,E> predicateForFirst,
Try.BiPredicate<? super T,? super U,E2> predicateForLast)
This method only run sequentially, even in parallel stream. |
abstract <E extends java.lang.Exception> |
findLast(Try.Predicate<? super T,E> predicate) |
static <T> Stream<T> |
flat(java.util.Collection<? extends java.util.Collection<? extends T>> c) |
static <T> Stream<T> |
flat(T[][] a) |
static <T> Stream<T> |
flat(T[][][] a) |
static <T> Stream<T> |
flat(T[][] a,
boolean vertically) |
static <T> Stream<T> |
flat(T[][] a,
T valueForNone,
boolean vertically) |
abstract <R> Stream<R> |
flatMap(Function<? super T,? extends Stream<? extends R>> mapper) |
abstract <R> Stream<R> |
flatMapp(Function<? super T,R[]> mapper) |
abstract <K,V> EntryStream<K,V> |
flatMappToEntry(Function<? super T,? extends EntryStream<? extends K,? extends V>> mapper) |
abstract ByteStream |
flatMapToByte(Function<? super T,? extends ByteStream> mapper) |
abstract CharStream |
flatMapToChar(Function<? super T,? extends CharStream> mapper) |
abstract DoubleStream |
flatMapToDouble(Function<? super T,? extends DoubleStream> mapper) |
abstract <K,V> EntryStream<K,V> |
flatMapToEntry(Function<? super T,? extends Stream<? extends java.util.Map.Entry<? extends K,? extends V>>> mapper) |
abstract FloatStream |
flatMapToFloat(Function<? super T,? extends FloatStream> mapper) |
abstract IntStream |
flatMapToInt(Function<? super T,? extends IntStream> mapper) |
abstract LongStream |
flatMapToLong(Function<? super T,? extends LongStream> mapper) |
abstract ShortStream |
flatMapToShort(Function<? super T,? extends ShortStream> mapper) |
abstract <R> Stream<R> |
flattMap(Function<? super T,? extends java.util.Collection<? extends R>> mapper) |
abstract ByteStream |
flattMapToByte(Function<? super T,byte[]> mapper) |
abstract CharStream |
flattMapToChar(Function<? super T,char[]> mapper) |
abstract DoubleStream |
flattMapToDouble(Function<? super T,double[]> mapper) |
abstract <K,V> EntryStream<K,V> |
flattMapToEntry(Function<? super T,? extends java.util.Map<? extends K,? extends V>> mapper) |
abstract FloatStream |
flattMapToFloat(Function<? super T,float[]> mapper) |
abstract IntStream |
flattMapToInt(Function<? super T,int[]> mapper) |
abstract LongStream |
flattMapToLong(Function<? super T,long[]> mapper) |
abstract ShortStream |
flattMapToShort(Function<? super T,short[]> mapper) |
abstract <K> ListMultimap<K,T> |
flatToMultimap(Function<? super T,? extends Stream<? extends K>> flatKeyMapper) |
abstract <K,V> ListMultimap<K,V> |
flatToMultimap(Function<? super T,? extends Stream<? extends K>> flatKeyMapper,
BiFunction<? super K,? super T,? extends V> valueMapper) |
abstract <K,V,C extends java.util.Collection<V>,M extends Multimap<K,V,C>> |
flatToMultimap(Function<? super T,? extends Stream<? extends K>> flatKeyMapper,
BiFunction<? super K,? super T,? extends V> valueMapper,
Supplier<? extends M> mapFactory) |
abstract <K,V extends java.util.Collection<T>,M extends Multimap<K,T,V>> |
flatToMultimap(Function<? super T,? extends Stream<? extends K>> flatKeyMapper,
Supplier<? extends M> mapFactory) |
abstract <K> ListMultimap<K,T> |
flattToMultimap(Function<? super T,? extends java.util.Collection<? extends K>> flatKeyMapper) |
abstract <K,V> ListMultimap<K,V> |
flattToMultimap(Function<? super T,? extends java.util.Collection<? extends K>> flatKeyMapper,
BiFunction<? super K,? super T,? extends V> valueMapper) |
abstract <K,V,C extends java.util.Collection<V>,M extends Multimap<K,V,C>> |
flattToMultimap(Function<? super T,? extends java.util.Collection<? extends K>> flatKeyMapper,
BiFunction<? super K,? super T,? extends V> valueMapper,
Supplier<? extends M> mapFactory) |
abstract <K,V extends java.util.Collection<T>,M extends Multimap<K,T,V>> |
flattToMultimap(Function<? super T,? extends java.util.Collection<? extends K>> flatKeyMapper,
Supplier<? extends M> mapFactory) |
abstract <E extends java.lang.Exception> |
forEach(Try.Consumer<? super T,E> action) |
abstract <E extends java.lang.Exception,E2 extends java.lang.Exception> |
forEach(Try.Consumer<? super T,E> action,
Try.Runnable<E2> onComplete) |
abstract <T2,T3,E extends java.lang.Exception,E2 extends java.lang.Exception,E3 extends java.lang.Exception> |
forEach(Try.Function<? super T,? extends java.util.Collection<T2>,E> flatMapper,
Try.Function<? super T2,? extends java.util.Collection<T3>,E2> flatMapper2,
Try.TriConsumer<? super T,? super T2,? super T3,E3> action) |
abstract <U,E extends java.lang.Exception,E2 extends java.lang.Exception> |
forEach(Try.Function<? super T,? extends java.util.Collection<U>,E> flatMapper,
Try.BiConsumer<? super T,? super U,E2> action) |
abstract <E extends java.lang.Exception> |
forEachPair(Try.BiConsumer<? super T,? super T,E> action) |
abstract <E extends java.lang.Exception> |
forEachPair(Try.BiConsumer<? super T,? super T,E> action,
int increment)
Slide with
windowSize = 2 and the specified increment , then consume by the specified mapper . |
abstract <E extends java.lang.Exception> |
forEachTriple(Try.TriConsumer<? super T,? super T,? super T,E> action) |
abstract <E extends java.lang.Exception> |
forEachTriple(Try.TriConsumer<? super T,? super T,? super T,E> action,
int increment)
Slide with
windowSize = 3 and the specified increment , then consume by the specified mapper . |
abstract <U> Stream<Pair<T,U>> |
fullJoin(java.util.Collection<U> b,
BiPredicate<? super T,? super U> predicate)
The time complexity is O(n * m) : n is the size of this
Stream and m is the size of specified collection b . |
abstract <U> Stream<Pair<T,U>> |
fullJoin(java.util.Collection<U> b,
Function<? super T,?> leftKeyMapper,
Function<? super U,?> rightKeyMapper)
The time complexity is O(n + m) : n is the size of this
Stream and m is the size of specified collection b . |
static <T> Stream<T> |
generate(Supplier<T> s) |
abstract <K> Stream<java.util.Map.Entry<K,java.util.List<T>>> |
groupBy(Function<? super T,? extends K> keyMapper) |
abstract <K,A,D> Stream<java.util.Map.Entry<K,D>> |
groupBy(Function<? super T,? extends K> keyMapper,
Collector<? super T,A,D> downstream) |
abstract <K,A,D> Stream<java.util.Map.Entry<K,D>> |
groupBy(Function<? super T,? extends K> keyMapper,
Collector<? super T,A,D> downstream,
Supplier<? extends java.util.Map<K,D>> mapFactory) |
abstract <K,V> Stream<java.util.Map.Entry<K,java.util.List<V>>> |
groupBy(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper) |
abstract <K,V> Stream<java.util.Map.Entry<K,V>> |
groupBy(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
BinaryOperator<V> mergeFunction) |
abstract <K,V> Stream<java.util.Map.Entry<K,V>> |
groupBy(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
BinaryOperator<V> mergeFunction,
Supplier<? extends java.util.Map<K,V>> mapFactory) |
abstract <K,V,A,D> Stream<java.util.Map.Entry<K,D>> |
groupBy(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Collector<? super V,A,D> downstream) |
abstract <K,V,A,D> Stream<java.util.Map.Entry<K,D>> |
groupBy(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Collector<? super V,A,D> downstream,
Supplier<? extends java.util.Map<K,D>> mapFactory) |
abstract <K,V> Stream<java.util.Map.Entry<K,java.util.List<V>>> |
groupBy(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Supplier<? extends java.util.Map<K,java.util.List<V>>> mapFactory) |
abstract <K> Stream<java.util.Map.Entry<K,java.util.List<T>>> |
groupBy(Function<? super T,? extends K> keyMapper,
Supplier<? extends java.util.Map<K,java.util.List<T>>> mapFactory) |
abstract <K> EntryStream<K,java.util.List<T>> |
groupByToEntry(Function<? super T,? extends K> keyMapper) |
abstract <K,A,D> EntryStream<K,D> |
groupByToEntry(Function<? super T,? extends K> keyMapper,
Collector<? super T,A,D> downstream) |
abstract <K,A,D> EntryStream<K,D> |
groupByToEntry(Function<? super T,? extends K> keyMapper,
Collector<? super T,A,D> downstream,
Supplier<? extends java.util.Map<K,D>> mapFactory) |
abstract <K,V> EntryStream<K,java.util.List<V>> |
groupByToEntry(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper) |
abstract <K,V> EntryStream<K,V> |
groupByToEntry(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
BinaryOperator<V> mergeFunction) |
abstract <K,V> EntryStream<K,V> |
groupByToEntry(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
BinaryOperator<V> mergeFunction,
Supplier<? extends java.util.Map<K,V>> mapFactory) |
abstract <K,V,A,D> EntryStream<K,D> |
groupByToEntry(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Collector<? super V,A,D> downstream) |
abstract <K,V,A,D> EntryStream<K,D> |
groupByToEntry(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Collector<? super V,A,D> downstream,
Supplier<? extends java.util.Map<K,D>> mapFactory) |
abstract <K,V> EntryStream<K,java.util.List<V>> |
groupByToEntry(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Supplier<? extends java.util.Map<K,java.util.List<V>>> mapFactory) |
abstract <K> EntryStream<K,java.util.List<T>> |
groupByToEntry(Function<? super T,? extends K> keyMapper,
Supplier<? extends java.util.Map<K,java.util.List<T>>> mapFactory) |
abstract <K> java.util.Map<K,java.util.List<T>> |
groupTo(Function<? super T,? extends K> keyMapper) |
abstract <K,V> java.util.Map<K,java.util.List<V>> |
groupTo(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper) |
abstract <K,V,M extends java.util.Map<K,java.util.List<V>>> |
groupTo(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Supplier<? extends M> mapFactory) |
abstract <K,M extends java.util.Map<K,java.util.List<T>>> |
groupTo(Function<? super T,? extends K> keyMapper,
Supplier<? extends M> mapFactory) |
abstract boolean |
hasDuplicates() |
abstract <U> Stream<Pair<T,U>> |
innerJoin(java.util.Collection<U> b,
BiPredicate<? super T,? super U> predicate)
The time complexity is O(n * m) : n is the size of this
Stream and m is the size of specified collection b . |
abstract <U> Stream<Pair<T,U>> |
innerJoin(java.util.Collection<U> b,
Function<? super T,?> leftKeyMapper,
Function<? super U,?> rightKeyMapper)
The time complexity is O(n + m) : n is the size of this
Stream and m is the size of specified collection b . |
abstract Stream<T> |
intersection(Function<? super T,?> mapper,
java.util.Collection<?> c)
Intersect with the specified Collection by the values mapped by
mapper . |
abstract Stream<T> |
intersperse(T delimiter)
Stream.of(1).intersperse(9) --> [1]
Stream.of(1, 2, 3).intersperse(9) --> [1, 9, 2, 9, 3]
This method only run sequentially, even in parallel stream. |
static <T> Stream<T> |
interval(long intervalInMillis,
LongFunction<T> s) |
static <T> Stream<T> |
interval(long delayInMillis,
long intervalInMillis,
LongFunction<T> s) |
static <T> Stream<T> |
interval(long delayInMillis,
long intervalInMillis,
Supplier<T> s) |
static <T> Stream<T> |
interval(long delay,
long interval,
java.util.concurrent.TimeUnit unit,
LongFunction<T> s) |
static <T> Stream<T> |
interval(long delay,
long interval,
java.util.concurrent.TimeUnit unit,
Supplier<T> s) |
static <T> Stream<T> |
interval(long intervalInMillis,
Supplier<T> s) |
boolean |
isParallel() |
static <T> Stream<T> |
iterate(BooleanSupplier hasNext,
Supplier<? extends T> next) |
static <T> Stream<T> |
iterate(T init,
BooleanSupplier hasNext,
UnaryOperator<T> f)
Returns a sequential ordered
Stream produced by iterative
application of a function f to an initial element init ,
producing a Stream consisting of init , f(init) ,
f(f(init)) , etc. |
static <T> Stream<T> |
iterate(T init,
Predicate<? super T> hasNext,
UnaryOperator<T> f) |
static <T> Stream<T> |
iterate(T init,
UnaryOperator<T> f) |
ObjIterator<T> |
iterator()
Remember to close this Stream after the iteration is done, if required.
|
java.lang.String |
join(java.lang.CharSequence delimiter) |
static <T> Stream<T> |
just(T a) |
abstract u.Optional<T> |
kthLargest(int k,
java.util.Comparator<? super T> comparator) |
abstract Stream<T> |
last(int n)
A queue with size up to
n will be maintained to filter out the last n elements. |
abstract <U> Stream<Pair<T,U>> |
leftJoin(java.util.Collection<U> b,
BiPredicate<? super T,? super U> predicate)
The time complexity is O(n * m) : n is the size of this
Stream and m is the size of specified collection b . |
abstract <U> Stream<Pair<T,U>> |
leftJoin(java.util.Collection<U> b,
Function<? super T,?> leftKeyMapper,
Function<? super U,?> rightKeyMapper)
The time complexity is O(n + m) : n is the size of this
Stream and m is the size of specified collection b . |
static Stream<java.lang.String> |
lines(java.io.File file) |
static Stream<java.lang.String> |
lines(java.io.File file,
java.nio.charset.Charset charset) |
static Stream<java.lang.String> |
lines(java.nio.file.Path path) |
static Stream<java.lang.String> |
lines(java.nio.file.Path path,
java.nio.charset.Charset charset) |
static Stream<java.lang.String> |
lines(java.io.Reader reader)
It's user's responsibility to close the input
reader after the stream is finished. |
static Stream<java.io.File> |
listFiles(java.io.File parentPath) |
static Stream<java.io.File> |
listFiles(java.io.File parentPath,
boolean recursively) |
abstract <R> Stream<R> |
map(Function<? super T,? extends R> mapper) |
abstract Stream<T> |
mapFirst(Function<? super T,? extends T> mapperForFirst) |
abstract <R> Stream<R> |
mapFirstOrElse(Function<? super T,? extends R> mapperForFirst,
Function<? super T,? extends R> mapperForElse) |
abstract Stream<T> |
mapLast(Function<? super T,? extends T> mapperForLast) |
abstract <R> Stream<R> |
mapLastOrElse(Function<? super T,? extends R> mapperForLast,
Function<? super T,? extends R> mapperForElse) |
abstract ByteStream |
mapToByte(ToByteFunction<? super T> mapper) |
abstract CharStream |
mapToChar(ToCharFunction<? super T> mapper) |
abstract <K,V> Stream<NoCachingNoUpdating.DisposableEntry<K,V>> |
mapToDisposableEntry(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper)
Deprecated.
|
abstract DoubleStream |
mapToDouble(ToDoubleFunction<? super T> mapper) |
abstract <K,V> EntryStream<K,V> |
mapToEntry(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper) |
abstract <K,V> EntryStream<K,V> |
mapToEntry(Function<? super T,? extends java.util.Map.Entry<? extends K,? extends V>> mapper) |
abstract FloatStream |
mapToFloat(ToFloatFunction<? super T> mapper) |
abstract IntStream |
mapToInt(ToIntFunction<? super T> mapper) |
abstract LongStream |
mapToLong(ToLongFunction<? super T> mapper) |
abstract ShortStream |
mapToShort(ToShortFunction<? super T> mapper) |
abstract u.Optional<T> |
max(java.util.Comparator<? super T> comparator) |
u.Optional<T> |
maxBy(Function<? super T,? extends java.lang.Comparable> keyMapper) |
static <T> Stream<T> |
merge(java.util.Collection<? extends Stream<? extends T>> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
merge(java.util.Collection<? extends T> a,
java.util.Collection<? extends T> b,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
merge(java.util.Collection<? extends T> a,
java.util.Collection<? extends T> b,
java.util.Collection<? extends T> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
merge(java.util.Iterator<? extends T> a,
java.util.Iterator<? extends T> b,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
merge(java.util.Iterator<? extends T> a,
java.util.Iterator<? extends T> b,
java.util.Iterator<? extends T> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
merge(java.util.List<? extends java.util.Collection<? extends T>> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
abstract Stream<T> |
merge(Stream<? extends T> b,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
merge(Stream<? extends T> a,
Stream<? extends T> b,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
merge(Stream<? extends T> a,
Stream<? extends T> b,
Stream<? extends T> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
merge(T[] a,
T[] b,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
merge(T[] a,
T[] b,
T[] c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
mergge(java.util.Collection<? extends java.util.Iterator<? extends T>> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
abstract u.Optional<T> |
min(java.util.Comparator<? super T> comparator) |
u.Optional<T> |
minBy(Function<? super T,? extends java.lang.Comparable> keyMapper) |
abstract <E extends java.lang.Exception> |
nMatch(long atLeast,
long atMost,
Try.Predicate<? super T,E> predicate) |
abstract <E extends java.lang.Exception> |
noneMatch(Try.Predicate<? super T,E> predicate) |
static <T> Stream<T> |
observe(java.util.concurrent.BlockingQueue<T> queue,
BooleanSupplier hasMore,
long maxWaitIntervalInMillis) |
static <T> Stream<T> |
observe(java.util.concurrent.BlockingQueue<T> queue,
BooleanSupplier hasMore,
long maxWaitIntervalInMillis,
java.lang.Runnable onComplete)
Sample code:
|
static <T> Stream<T> |
observe(java.util.concurrent.BlockingQueue<T> queue,
Duration duration) |
static <T> Stream<T> |
observe(java.util.concurrent.BlockingQueue<T> queue,
Duration duration,
java.lang.Runnable onComplete)
Sample code:
|
static Stream<java.lang.Boolean> |
of(boolean[] a) |
static Stream<java.lang.Boolean> |
of(boolean[] a,
int fromIndex,
int toIndex) |
static Stream<java.lang.Byte> |
of(byte[] a) |
static Stream<java.lang.Byte> |
of(byte[] a,
int fromIndex,
int toIndex) |
static Stream<java.lang.Character> |
of(char[] a) |
static Stream<java.lang.Character> |
of(char[] a,
int fromIndex,
int toIndex) |
static <T> Stream<T> |
of(java.util.Collection<? extends T> c) |
static <T> Stream<T> |
of(java.util.Collection<? extends T> c,
int startIndex,
int endIndex) |
static Stream<java.lang.Double> |
of(double[] a) |
static Stream<java.lang.Double> |
of(double[] a,
int fromIndex,
int toIndex) |
static Stream<java.lang.Float> |
of(float[] a) |
static Stream<java.lang.Float> |
of(float[] a,
int fromIndex,
int toIndex) |
static Stream<java.lang.Integer> |
of(int[] a) |
static Stream<java.lang.Integer> |
of(int[] a,
int fromIndex,
int toIndex) |
static <T> Stream<T> |
of(java.lang.Iterable<? extends T> iterable) |
static <T> Stream<T> |
of(java.util.Iterator<? extends T> iterator) |
static Stream<java.lang.Long> |
of(long[] a) |
static Stream<java.lang.Long> |
of(long[] a,
int fromIndex,
int toIndex) |
static <K,V> Stream<java.util.Map.Entry<K,V>> |
of(java.util.Map<K,V> map) |
static Stream<java.lang.Short> |
of(short[] a) |
static Stream<java.lang.Short> |
of(short[] a,
int fromIndex,
int toIndex) |
static <T> Stream<T> |
of(java.util.stream.Stream<T> stream) |
static <T> Stream<T> |
of(Supplier<java.util.Collection<? extends T>> supplier)
Lazy evaluation.
|
static <T> Stream<T> |
of(T... a) |
static <T> Stream<T> |
of(T[] a,
int startIndex,
int endIndex) |
static <K> Stream<K> |
ofKeys(java.util.Map<K,?> map) |
static <K,V> Stream<K> |
ofKeys(java.util.Map<K,V> map,
Predicate<? super V> valueFilter) |
static <T> Stream<T> |
ofNullable(T t) |
static <V> Stream<V> |
ofValues(java.util.Map<?,V> map) |
static <K,V> Stream<V> |
ofValues(java.util.Map<K,V> map,
Predicate<? super K> keyFilter) |
abstract Stream<java.util.List<T>> |
orderedPermutations()
Stream.of(1, 2, 3).orderedPermutations().forEach(Fn.println());
// output
[1, 2, 3]
[1, 3, 2]
[2, 1, 3]
[2, 3, 1]
[3, 1, 2]
[3, 2, 1]
|
abstract Stream<java.util.List<T>> |
orderedPermutations(java.util.Comparator<? super T> comparator) |
S |
parallel() |
S |
parallel(BaseStream.Splitor splitor) |
S |
parallel(java.util.concurrent.Executor exector) |
S |
parallel(int maxThreadNum) |
static <T> Stream<T> |
parallelConcat(java.util.Collection<? extends Stream<? extends T>> c)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T> Stream<T> |
parallelConcat(java.util.Collection<? extends Stream<? extends T>> c,
int readThreadNum)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T> Stream<T> |
parallelConcat(java.util.Collection<? extends Stream<? extends T>> c,
int readThreadNum,
int queueSize)
Returns a Stream with elements from a temporary queue which is filled by reading the elements from the specified iterators in parallel.
|
static <T> Stream<T> |
parallelConcat(java.util.Iterator<? extends T>... a)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T> Stream<T> |
parallelConcat(java.util.Iterator<? extends T>[] a,
int readThreadNum,
int queueSize)
Returns a Stream with elements from a temporary queue which is filled by reading the elements from the specified iterators in parallel.
|
static <T> Stream<T> |
parallelConcat(Stream<? extends T>... a)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T> Stream<T> |
parallelConcat(Stream<? extends T>[] a,
int readThreadNum,
int queueSize)
Returns a Stream with elements from a temporary queue which is filled by reading the elements from the specified iterators in parallel.
|
static <T> Stream<T> |
parallelConcatt(java.util.Collection<? extends java.util.Iterator<? extends T>> c)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T> Stream<T> |
parallelConcatt(java.util.Collection<? extends java.util.Iterator<? extends T>> c,
int readThreadNum)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T> Stream<T> |
parallelConcatt(java.util.Collection<? extends java.util.Iterator<? extends T>> c,
int readThreadNum,
int queueSize)
Returns a Stream with elements from a temporary queue which is filled by reading the elements from the specified iterators in parallel.
|
static <T> Stream<T> |
parallelMerge(java.util.Collection<? extends Stream<? extends T>> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
parallelMerge(java.util.Collection<? extends Stream<? extends T>> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector,
int maxThreadNum) |
static <T> Stream<T> |
parallelMerge(java.util.List<? extends java.util.Collection<? extends T>> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
parallelMerge(java.util.List<? extends java.util.Collection<? extends T>> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector,
int maxThreadNum) |
static <T> Stream<T> |
parallelMergge(java.util.Collection<? extends java.util.Iterator<? extends T>> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector) |
static <T> Stream<T> |
parallelMergge(java.util.Collection<? extends java.util.Iterator<? extends T>> c,
BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector,
int maxThreadNum) |
static <T,R> Stream<R> |
parallelZip(java.util.Collection<? extends Stream<? extends T>> c,
Function<? super java.util.List<? extends T>,R> zipFunction)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T,R> Stream<R> |
parallelZip(java.util.Collection<? extends Stream<? extends T>> c,
Function<? super java.util.List<? extends T>,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T,R> Stream<R> |
parallelZip(java.util.Collection<? extends Stream<? extends T>> c,
java.util.List<? extends T> valuesForNone,
Function<? super java.util.List<? extends T>,R> zipFunction)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T,R> Stream<R> |
parallelZip(java.util.Collection<? extends Stream<? extends T>> c,
java.util.List<? extends T> valuesForNone,
Function<? super java.util.List<? extends T>,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,R> Stream<R> |
parallelZip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
A valueForNoneA,
B valueForNoneB,
BiFunction<? super A,? super B,R> zipFunction)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,R> Stream<R> |
parallelZip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
A valueForNoneA,
B valueForNoneB,
BiFunction<? super A,? super B,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,R> Stream<R> |
parallelZip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
BiFunction<? super A,? super B,R> zipFunction)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,R> Stream<R> |
parallelZip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
BiFunction<? super A,? super B,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,C,R> Stream<R> |
parallelZip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
java.util.Iterator<? extends C> c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
TriFunction<? super A,? super B,? super C,R> zipFunction)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,C,R> Stream<R> |
parallelZip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
java.util.Iterator<? extends C> c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
TriFunction<? super A,? super B,? super C,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,C,R> Stream<R> |
parallelZip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
java.util.Iterator<? extends C> c,
TriFunction<? super A,? super B,? super C,R> zipFunction) |
static <A,B,C,R> Stream<R> |
parallelZip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
java.util.Iterator<? extends C> c,
TriFunction<? super A,? super B,? super C,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T,R> Stream<R> |
parallelZip(java.util.List<? extends java.util.Collection<? extends T>> c,
Function<? super java.util.List<? extends T>,R> zipFunction) |
static <T,R> Stream<R> |
parallelZip(java.util.List<? extends java.util.Collection<? extends T>> c,
Function<? super java.util.List<? extends T>,R> zipFunction,
int queueSize) |
static <T,R> Stream<R> |
parallelZip(java.util.List<? extends java.util.Collection<? extends T>> c,
java.util.List<? extends T> valuesForNone,
Function<? super java.util.List<? extends T>,R> zipFunction) |
static <T,R> Stream<R> |
parallelZip(java.util.List<? extends java.util.Collection<? extends T>> c,
java.util.List<? extends T> valuesForNone,
Function<? super java.util.List<? extends T>,R> zipFunction,
int queueSize) |
static <A,B,R> Stream<R> |
parallelZip(Stream<A> a,
Stream<B> b,
A valueForNoneA,
B valueForNoneB,
BiFunction<? super A,? super B,R> zipFunction)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,R> Stream<R> |
parallelZip(Stream<A> a,
Stream<B> b,
A valueForNoneA,
B valueForNoneB,
BiFunction<? super A,? super B,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,R> Stream<R> |
parallelZip(Stream<A> a,
Stream<B> b,
BiFunction<? super A,? super B,R> zipFunction)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,R> Stream<R> |
parallelZip(Stream<A> a,
Stream<B> b,
BiFunction<? super A,? super B,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,C,R> Stream<R> |
parallelZip(Stream<A> a,
Stream<B> b,
Stream<C> c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
TriFunction<? super A,? super B,? super C,R> zipFunction)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,C,R> Stream<R> |
parallelZip(Stream<A> a,
Stream<B> b,
Stream<C> c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
TriFunction<? super A,? super B,? super C,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <A,B,C,R> Stream<R> |
parallelZip(Stream<A> a,
Stream<B> b,
Stream<C> c,
TriFunction<? super A,? super B,? super C,R> zipFunction) |
static <A,B,C,R> Stream<R> |
parallelZip(Stream<A> a,
Stream<B> b,
Stream<C> c,
TriFunction<? super A,? super B,? super C,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T,R> Stream<R> |
parallelZipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c,
Function<? super java.util.List<? extends T>,R> zipFunction)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T,R> Stream<R> |
parallelZipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c,
Function<? super java.util.List<? extends T>,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T,R> Stream<R> |
parallelZipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c,
java.util.List<? extends T> valuesForNone,
Function<? super java.util.List<? extends T>,R> zipFunction)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
static <T,R> Stream<R> |
parallelZipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c,
java.util.List<? extends T> valuesForNone,
Function<? super java.util.List<? extends T>,R> zipFunction,
int queueSize)
Put the stream in try-catch to stop the back-end reading thread if error happens
try (Stream |
abstract Stream<java.util.Map.Entry<java.lang.Boolean,java.util.List<T>>> |
partitionBy(Predicate<? super T> predicate) |
abstract <A,D> Stream<java.util.Map.Entry<java.lang.Boolean,D>> |
partitionBy(Predicate<? super T> predicate,
Collector<? super T,A,D> downstream) |
abstract EntryStream<java.lang.Boolean,java.util.List<T>> |
partitionByToEntry(Predicate<? super T> predicate) |
abstract <A,D> EntryStream<java.lang.Boolean,D> |
partitionByToEntry(Predicate<? super T> predicate,
Collector<? super T,A,D> downstream) |
abstract java.util.Map<java.lang.Boolean,java.util.List<T>> |
partitionTo(Predicate<? super T> predicate) |
abstract <A,D> java.util.Map<java.lang.Boolean,D> |
partitionTo(Predicate<? super T> predicate,
Collector<? super T,A,D> downstream) |
abstract Stream<T> |
peekFirst(Consumer<? super T> action) |
abstract Stream<T> |
peekLast(Consumer<? super T> action) |
abstract u.Optional<java.util.Map<com.landawn.abacus.util.Percentage,T>> |
percentiles(java.util.Comparator<? super T> comparator) |
abstract Stream<java.util.List<T>> |
permutations()
Stream.of(1, 2, 3).permutations().forEach(Fn.println());
// output
[1, 2, 3]
[1, 3, 2]
[3, 1, 2]
[3, 2, 1]
[2, 3, 1]
[2, 1, 3]
|
abstract long |
persist(java.sql.Connection conn,
java.lang.String insertSQL,
int batchSize,
int batchInterval,
JdbcUtil.BiParametersSetter<? super java.sql.PreparedStatement,? super T> stmtSetter) |
abstract long |
persist(java.io.File file,
Try.Function<? super T,java.lang.String,java.io.IOException> toLine) |
abstract long |
persist(java.io.OutputStream os,
Try.Function<? super T,java.lang.String,java.io.IOException> toLine) |
abstract long |
persist(java.sql.PreparedStatement stmt,
int batchSize,
int batchInterval,
JdbcUtil.BiParametersSetter<? super java.sql.PreparedStatement,? super T> stmtSetter) |
abstract long |
persist(java.io.Writer writer,
Try.Function<? super T,java.lang.String,java.io.IOException> toLine) |
abstract Stream<T> |
prepend(java.util.Collection<? extends T> c) |
Stream<T> |
prepend(T... a) |
abstract Stream<T> |
prependAlll(java.util.Collection<? extends java.util.Collection<? extends T>> cs) |
void |
println() |
abstract Stream<T> |
queued()
Returns a new Stream with elements from a temporary queue which is filled by reading the elements from this Stream asynchronously.
|
abstract Stream<T> |
queued(int queueSize)
Returns a new Stream with elements from a temporary queue which is filled by reading the elements from this Stream asynchronously.
|
abstract <U> Stream<U> |
rangeMap(BiPredicate<? super T,? super T> sameRange,
BiFunction<? super T,? super T,? extends U> mapper)
Note: copied from StreamEx: https://github.com/amaembo/streamex
Returns a stream consisting of results of applying the given function to the ranges created from the source elements. |
abstract u.Optional<T> |
reduce(BinaryOperator<T> accumulator) |
abstract T |
reduce(T identity,
BinaryOperator<T> accumulator) |
abstract <U> U |
reduce(U identity,
BiFunction<U,? super T,U> accumulator,
BinaryOperator<U> combiner) |
static <T> Stream<T> |
repeat(T element,
long n) |
abstract <U> Stream<Pair<T,U>> |
rightJoin(java.util.Collection<U> b,
BiPredicate<? super T,? super U> predicate)
The time complexity is O(n * m) : n is the size of this
Stream and m is the size of specified collection b . |
abstract <U> Stream<Pair<T,U>> |
rightJoin(java.util.Collection<U> b,
Function<? super T,?> leftKeyMapper,
Function<? super U,?> rightKeyMapper)
The time complexity is O(n + m) : n is the size of this
Stream and m is the size of specified collection b . |
static <T> Stream<T> |
rows(java.lang.Class<T> targetClass,
java.sql.ResultSet resultSet)
It's user's responsibility to close the input
resultSet after the stream is finished. |
static Stream<java.lang.Object[]> |
rows(java.sql.ResultSet resultSet)
It's user's responsibility to close the input
resultSet after the stream is finished. |
static <T> Stream<T> |
rows(java.sql.ResultSet resultSet,
int columnIndex)
It's user's responsibility to close the input
resultSet after the stream is finished. |
static <T> Stream<T> |
rows(java.sql.ResultSet resultSet,
JdbcUtil.BiRowMapper<T> rowMapper)
It's user's responsibility to close the input
resultSet after the stream is finished. |
static <T> Stream<T> |
rows(java.sql.ResultSet resultSet,
JdbcUtil.RowMapper<T> rowMapper)
It's user's responsibility to close the input
resultSet after the stream is finished. |
static <T> Stream<T> |
rows(java.sql.ResultSet resultSet,
java.lang.String columnName)
It's user's responsibility to close the input
resultSet after the stream is finished. |
abstract Stream<T> |
scan(BiFunction<? super T,? super T,T> accumulator)
Returns a
Stream produced by iterative application of a accumulation function
to an initial element init and next element of the current stream. |
abstract <U> Stream<U> |
scan(U init,
BiFunction<U,? super T,U> accumulator)
Returns a
Stream produced by iterative application of a accumulation function
to an initial element init and next element of the current stream. |
abstract <U> Stream<U> |
scan(U init,
BiFunction<U,? super T,U> accumulator,
boolean initIncluded) |
<U> Stream<U> |
select(java.lang.Class<U> targetType) |
S |
sequential() |
S |
shuffled()
This method only run sequentially, even in parallel stream and all elements will be loaded to memory. |
abstract Stream<T> |
skipLast(int n)
A queue with size up to
n will be maintained to filter out the last n elements. |
abstract Stream<T> |
skipNull() |
S |
slice(long from,
long to)
Same as:
stream.skip(from).limit(to - from) . |
Stream<S> |
sliding(int windowSize) |
abstract <A,R> Stream<R> |
sliding(int windowSize,
Collector<? super T,A,R> collector) |
abstract <A,R> Stream<R> |
sliding(int windowSize,
int increment,
Collector<? super T,A,R> collector) |
abstract <C extends java.util.Collection<T>> |
sliding(int windowSize,
IntFunction<? extends C> collectionSupplier) |
abstract <C extends java.util.Collection<T>> |
sliding(int windowSize,
int increment,
IntFunction<? extends C> collectionSupplier) |
abstract <R> Stream<R> |
slidingMap(BiFunction<? super T,? super T,R> mapper) |
abstract <R> Stream<R> |
slidingMap(BiFunction<? super T,? super T,R> mapper,
int increment)
Slide with
windowSize = 2 and the specified increment , then map by the specified mapper . |
abstract <R> Stream<R> |
slidingMap(BiFunction<? super T,? super T,R> mapper,
int increment,
boolean ignoreNotPaired) |
abstract <R> Stream<R> |
slidingMap(TriFunction<? super T,? super T,? super T,R> mapper) |
abstract <R> Stream<R> |
slidingMap(TriFunction<? super T,? super T,? super T,R> mapper,
int increment)
Slide with
windowSize = 3 and the specified increment , then map by the specified mapper . |
abstract <R> Stream<R> |
slidingMap(TriFunction<? super T,? super T,? super T,R> mapper,
int increment,
boolean ignoreNotPaired) |
Stream<PL> |
slidingToList(int windowSize) |
abstract Stream<T> |
sorted(java.util.Comparator<? super T> comparator) |
abstract Stream<T> |
sortedBy(Function<? super T,? extends java.lang.Comparable> keyMapper) |
abstract Stream<T> |
sortedByDouble(ToDoubleFunction<? super T> keyMapper) |
abstract Stream<T> |
sortedByInt(ToIntFunction<? super T> keyMapper) |
abstract Stream<T> |
sortedByLong(ToLongFunction<? super T> keyMapper) |
abstract <A,R> Stream<R> |
split(int chunkSize,
Collector<? super T,A,R> collector) |
abstract <C extends java.util.Collection<T>> |
split(int chunkSize,
IntFunction<? extends C> collectionSupplier)
Returns Stream of Stream with consecutive sub sequences of the elements, each of the same size (the final sequence may be smaller).
|
abstract <A,R> Stream<R> |
split(Predicate<? super T> predicate,
Collector<? super T,A,R> collector) |
abstract <C extends java.util.Collection<T>> |
split(Predicate<? super T> predicate,
Supplier<? extends C> collectionSupplier) |
abstract <A,R> Stream<R> |
splitAt(int where,
Collector<? super T,A,R> collector) |
abstract <A,R> Stream<R> |
splitBy(Predicate<? super T> where,
Collector<? super T,A,R> collector) |
abstract Stream<java.util.Set<T>> |
splitToSet(int chunkSize)
Returns Stream of Stream with consecutive sub sequences of the elements, each of the same size (the final sequence may be smaller).
|
abstract Stream<java.util.Set<T>> |
splitToSet(Predicate<? super T> predicate) |
abstract double |
sumDouble(ToDoubleFunction<? super T> mapper) |
abstract int |
sumInt(ToIntFunction<? super T> mapper) |
abstract long |
sumLong(ToLongFunction<? super T> mapper) |
abstract <A> A[] |
toArray(IntFunction<A[]> generator) |
abstract DataSet |
toDataSet() |
abstract DataSet |
toDataSet(boolean isFirstTitle) |
abstract DataSet |
toDataSet(java.util.List<java.lang.String> columnNames) |
ImmutableList<T> |
toImmutableList() |
<K,V> ImmutableMap<K,V> |
toImmutableMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper) |
<K,V> ImmutableMap<K,V> |
toImmutableMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
BinaryOperator<V> mergeFunction) |
ImmutableSet<T> |
toImmutableSet() |
abstract java.util.stream.Stream<T> |
toJdkStream()
Remember to close this Stream after the iteration is done, if required.
|
abstract <R> R |
toListAndThen(Function<? super java.util.List<T>,R> func) |
abstract <K,A,D> java.util.Map<K,D> |
toMap(Function<? super T,? extends K> keyMapper,
Collector<? super T,A,D> downstream) |
abstract <K,A,D,M extends java.util.Map<K,D>> |
toMap(Function<? super T,? extends K> keyMapper,
Collector<? super T,A,D> downstream,
Supplier<? extends M> mapFactory) |
abstract <K,V> java.util.Map<K,V> |
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper) |
abstract <K,V> java.util.Map<K,V> |
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
BinaryOperator<V> mergeFunction) |
abstract <K,V,M extends java.util.Map<K,V>> |
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
BinaryOperator<V> mergeFunction,
Supplier<? extends M> mapFactory) |
abstract <K,V,A,D> java.util.Map<K,D> |
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Collector<? super V,A,D> downstream) |
abstract <K,V,A,D,M extends java.util.Map<K,D>> |
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Collector<? super V,A,D> downstream,
Supplier<? extends M> mapFactory) |
abstract <K,V,M extends java.util.Map<K,V>> |
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Supplier<? extends M> mapFactory) |
abstract Matrix<T> |
toMatrix(java.lang.Class<T> type) |
abstract <K> ListMultimap<K,T> |
toMultimap(Function<? super T,? extends K> keyMapper) |
abstract <K,V> ListMultimap<K,V> |
toMultimap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper) |
abstract <K,V,C extends java.util.Collection<V>,M extends Multimap<K,V,C>> |
toMultimap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Supplier<? extends M> mapFactory) |
abstract <K,V extends java.util.Collection<T>,M extends Multimap<K,T,V>> |
toMultimap(Function<? super T,? extends K> keyMapper,
Supplier<? extends M> mapFactory) |
abstract Stream<T> |
top(int n)
This method only run sequentially, even in parallel stream. |
abstract Stream<T> |
top(int n,
java.util.Comparator<? super T> comparator)
This method only run sequentially, even in parallel stream. |
abstract <R> R |
toSetAndThen(Function<? super java.util.Set<T>,R> func) |
abstract Stream<Stream<T>> |
window(Duration duration)
Split this stream by the specified duration.
|
abstract <A,R> Stream<R> |
window(Duration duration,
Collector<? super T,A,R> collector) |
abstract Stream<Stream<T>> |
window(Duration duration,
long incrementInMillis) |
abstract <A,R> Stream<R> |
window(Duration duration,
long incrementInMillis,
Collector<? super T,A,R> collector) |
abstract Stream<Stream<T>> |
window(Duration duration,
long incrementInMillis,
LongSupplier startTime) |
abstract <A,R> Stream<R> |
window(Duration duration,
long incrementInMillis,
LongSupplier startTime,
Collector<? super T,A,R> collector) |
abstract <C extends java.util.Collection<T>> |
window(Duration duration,
long incrementInMillis,
LongSupplier startTime,
Supplier<? extends C> collectionSupplier) |
abstract Stream<Stream<T>> |
window(Duration duration,
LongSupplier startTime) |
abstract <C extends java.util.Collection<T>> |
window(Duration duration,
long incrementInMillis,
Supplier<? extends C> collectionSupplier) |
abstract <A,R> Stream<R> |
window(Duration duration,
LongSupplier startTime,
Collector<? super T,A,R> collector) |
abstract <C extends java.util.Collection<T>> |
window(Duration duration,
LongSupplier startTime,
Supplier<? extends C> collectionSupplier) |
abstract <C extends java.util.Collection<T>> |
window(Duration duration,
Supplier<? extends C> collectionSupplier) |
abstract Stream<Stream<T>> |
window(int maxWindowSize,
Duration maxDuration) |
abstract <A,R> Stream<R> |
window(int maxWindowSize,
Duration maxDuration,
Collector<? super T,A,R> collector) |
abstract Stream<Stream<T>> |
window(int maxWindowSize,
Duration maxDuration,
LongSupplier startTime) |
abstract <A,R> Stream<R> |
window(int maxWindowSize,
Duration maxDuration,
LongSupplier startTime,
Collector<? super T,A,R> collector)
Split this stream at where
maxWindowSize or maxDuration reaches first. |
abstract <C extends java.util.Collection<T>> |
window(int maxWindowSize,
Duration maxDuration,
LongSupplier startTime,
Supplier<? extends C> collectionSupplier)
Split this stream at where
maxWindowSize or maxDuration reaches first. |
abstract <C extends java.util.Collection<T>> |
window(int maxWindowSize,
Duration maxDuration,
Supplier<? extends C> collectionSupplier) |
abstract Stream<java.util.List<T>> |
windowToList(Duration duration) |
abstract Stream<java.util.List<T>> |
windowToList(Duration duration,
long incrementInMillis) |
abstract Stream<java.util.Set<T>> |
windowToSet(Duration duration) |
abstract Stream<java.util.Set<T>> |
windowToSet(Duration duration,
long incrementInMillis) |
static <A,B,R> Stream<R> |
zip(A[] a,
B[] b,
A valueForNoneA,
B valueForNoneB,
BiFunction<? super A,? super B,R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <A,B,R> Stream<R> |
zip(A[] a,
B[] b,
BiFunction<? super A,? super B,R> zipFunction)
Zip together the "a" and "b" arrays until one of them runs out of values.
|
static <A,B,C,R> Stream<R> |
zip(A[] a,
B[] b,
C[] c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
TriFunction<? super A,? super B,? super C,R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <A,B,C,R> Stream<R> |
zip(A[] a,
B[] b,
C[] c,
TriFunction<? super A,? super B,? super C,R> zipFunction)
Zip together the "a", "b" and "c" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(byte[] a,
byte[] b,
byte[] c,
byte valueForNoneA,
byte valueForNoneB,
byte valueForNoneC,
ByteTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(byte[] a,
byte[] b,
byte[] c,
ByteTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(byte[] a,
byte[] b,
ByteBiFunction<R> zipFunction)
Zip together the "a" and "b" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(byte[] a,
byte[] b,
byte valueForNoneA,
byte valueForNoneB,
ByteBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(ByteIterator a,
ByteIterator b,
ByteBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(ByteIterator a,
ByteIterator b,
byte valueForNoneA,
byte valueForNoneB,
ByteBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(ByteIterator a,
ByteIterator b,
ByteIterator c,
byte valueForNoneA,
byte valueForNoneB,
byte valueForNoneC,
ByteTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(ByteIterator a,
ByteIterator b,
ByteIterator c,
ByteTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(ByteStream a,
ByteStream b,
ByteBiFunction<R> zipFunction)
Zip together the "a" and "b" streams until one of them runs out of values.
|
static <R> Stream<R> |
zip(ByteStream a,
ByteStream b,
byte valueForNoneA,
byte valueForNoneB,
ByteBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(ByteStream a,
ByteStream b,
ByteStream c,
byte valueForNoneA,
byte valueForNoneB,
byte valueForNoneC,
ByteTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(ByteStream a,
ByteStream b,
ByteStream c,
ByteTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" streams until one of them runs out of values.
|
static <R> Stream<R> |
zip(char[] a,
char[] b,
char[] c,
char valueForNoneA,
char valueForNoneB,
char valueForNoneC,
CharTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(char[] a,
char[] b,
char[] c,
CharTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(char[] a,
char[] b,
CharBiFunction<R> zipFunction)
Zip together the "a" and "b" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(char[] a,
char[] b,
char valueForNoneA,
char valueForNoneB,
CharBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(CharIterator a,
CharIterator b,
CharBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(CharIterator a,
CharIterator b,
char valueForNoneA,
char valueForNoneB,
CharBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(CharIterator a,
CharIterator b,
CharIterator c,
char valueForNoneA,
char valueForNoneB,
char valueForNoneC,
CharTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(CharIterator a,
CharIterator b,
CharIterator c,
CharTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(CharStream a,
CharStream b,
CharBiFunction<R> zipFunction)
Zip together the "a" and "b" streams until one of them runs out of values.
|
static <R> Stream<R> |
zip(CharStream a,
CharStream b,
char valueForNoneA,
char valueForNoneB,
CharBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(CharStream a,
CharStream b,
CharStream c,
char valueForNoneA,
char valueForNoneB,
char valueForNoneC,
CharTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(CharStream a,
CharStream b,
CharStream c,
CharTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" streams until one of them runs out of values.
|
static <A,B,R> Stream<R> |
zip(java.util.Collection<? extends A> a,
java.util.Collection<? extends B> b,
A valueForNoneA,
B valueForNoneB,
BiFunction<? super A,? super B,R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <A,B,R> Stream<R> |
zip(java.util.Collection<? extends A> a,
java.util.Collection<? extends B> b,
BiFunction<? super A,? super B,R> zipFunction)
Zip together the "a" and "b" arrays until one of them runs out of values.
|
static <A,B,C,R> Stream<R> |
zip(java.util.Collection<? extends A> a,
java.util.Collection<? extends B> b,
java.util.Collection<? extends C> c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
TriFunction<? super A,? super B,? super C,R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <A,B,C,R> Stream<R> |
zip(java.util.Collection<? extends A> a,
java.util.Collection<? extends B> b,
java.util.Collection<? extends C> c,
TriFunction<? super A,? super B,? super C,R> zipFunction)
Zip together the "a", "b" and "c" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends ByteStream> c,
byte[] valuesForNone,
ByteNFunction<R> zipFunction)
Zip together the iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends ByteStream> c,
ByteNFunction<R> zipFunction)
Zip together the iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends CharStream> c,
char[] valuesForNone,
CharNFunction<R> zipFunction)
Zip together the iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends CharStream> c,
CharNFunction<R> zipFunction)
Zip together the iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends DoubleStream> c,
double[] valuesForNone,
DoubleNFunction<R> zipFunction)
Zip together the iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends DoubleStream> c,
DoubleNFunction<R> zipFunction)
Zip together the iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends FloatStream> c,
float[] valuesForNone,
FloatNFunction<R> zipFunction)
Zip together the iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends FloatStream> c,
FloatNFunction<R> zipFunction)
Zip together the iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends IntStream> c,
int[] valuesForNone,
IntNFunction<R> zipFunction)
Zip together the iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends IntStream> c,
IntNFunction<R> zipFunction)
Zip together the iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends LongStream> c,
long[] valuesForNone,
LongNFunction<R> zipFunction)
Zip together the iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends LongStream> c,
LongNFunction<R> zipFunction)
Zip together the iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends ShortStream> c,
short[] valuesForNone,
ShortNFunction<R> zipFunction)
Zip together the iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(java.util.Collection<? extends ShortStream> c,
ShortNFunction<R> zipFunction)
Zip together the iterators until one of them runs out of values.
|
static <T,R> Stream<R> |
zip(java.util.Collection<? extends Stream<? extends T>> c,
Function<? super java.util.List<? extends T>,R> zipFunction)
Zip together the iterators until one of them runs out of values.
|
static <T,R> Stream<R> |
zip(java.util.Collection<? extends Stream<? extends T>> c,
java.util.List<? extends T> valuesForNone,
Function<? super java.util.List<? extends T>,R> zipFunction)
Zip together the iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(double[] a,
double[] b,
double[] c,
double valueForNoneA,
double valueForNoneB,
double valueForNoneC,
DoubleTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(double[] a,
double[] b,
double[] c,
DoubleTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(double[] a,
double[] b,
DoubleBiFunction<R> zipFunction)
Zip together the "a" and "b" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(double[] a,
double[] b,
double valueForNoneA,
double valueForNoneB,
DoubleBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(DoubleIterator a,
DoubleIterator b,
DoubleBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(DoubleIterator a,
DoubleIterator b,
double valueForNoneA,
double valueForNoneB,
DoubleBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(DoubleIterator a,
DoubleIterator b,
DoubleIterator c,
double valueForNoneA,
double valueForNoneB,
double valueForNoneC,
DoubleTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(DoubleIterator a,
DoubleIterator b,
DoubleIterator c,
DoubleTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(DoubleStream a,
DoubleStream b,
DoubleBiFunction<R> zipFunction)
Zip together the "a" and "b" streams until one of them runs out of values.
|
static <R> Stream<R> |
zip(DoubleStream a,
DoubleStream b,
double valueForNoneA,
double valueForNoneB,
DoubleBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(DoubleStream a,
DoubleStream b,
DoubleStream c,
double valueForNoneA,
double valueForNoneB,
double valueForNoneC,
DoubleTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(DoubleStream a,
DoubleStream b,
DoubleStream c,
DoubleTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" streams until one of them runs out of values.
|
static <R> Stream<R> |
zip(float[] a,
float[] b,
float[] c,
float valueForNoneA,
float valueForNoneB,
float valueForNoneC,
FloatTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(float[] a,
float[] b,
float[] c,
FloatTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(float[] a,
float[] b,
FloatBiFunction<R> zipFunction)
Zip together the "a" and "b" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(float[] a,
float[] b,
float valueForNoneA,
float valueForNoneB,
FloatBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(FloatIterator a,
FloatIterator b,
FloatBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(FloatIterator a,
FloatIterator b,
float valueForNoneA,
float valueForNoneB,
FloatBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(FloatIterator a,
FloatIterator b,
FloatIterator c,
float valueForNoneA,
float valueForNoneB,
float valueForNoneC,
FloatTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(FloatIterator a,
FloatIterator b,
FloatIterator c,
FloatTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(FloatStream a,
FloatStream b,
FloatBiFunction<R> zipFunction)
Zip together the "a" and "b" streams until one of them runs out of values.
|
static <R> Stream<R> |
zip(FloatStream a,
FloatStream b,
float valueForNoneA,
float valueForNoneB,
FloatBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(FloatStream a,
FloatStream b,
FloatStream c,
float valueForNoneA,
float valueForNoneB,
float valueForNoneC,
FloatTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(FloatStream a,
FloatStream b,
FloatStream c,
FloatTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" streams until one of them runs out of values.
|
static <R> Stream<R> |
zip(int[] a,
int[] b,
int[] c,
int valueForNoneA,
int valueForNoneB,
int valueForNoneC,
IntTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(int[] a,
int[] b,
int[] c,
IntTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(int[] a,
int[] b,
IntBiFunction<R> zipFunction)
Zip together the "a" and "b" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(int[] a,
int[] b,
int valueForNoneA,
int valueForNoneB,
IntBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(IntIterator a,
IntIterator b,
IntBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(IntIterator a,
IntIterator b,
int valueForNoneA,
int valueForNoneB,
IntBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(IntIterator a,
IntIterator b,
IntIterator c,
int valueForNoneA,
int valueForNoneB,
int valueForNoneC,
IntTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(IntIterator a,
IntIterator b,
IntIterator c,
IntTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(IntStream a,
IntStream b,
IntBiFunction<R> zipFunction)
Zip together the "a" and "b" streams until one of them runs out of values.
|
static <R> Stream<R> |
zip(IntStream a,
IntStream b,
int valueForNoneA,
int valueForNoneB,
IntBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(IntStream a,
IntStream b,
IntStream c,
int valueForNoneA,
int valueForNoneB,
int valueForNoneC,
IntTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(IntStream a,
IntStream b,
IntStream c,
IntTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" streams until one of them runs out of values.
|
static <A,B,R> Stream<R> |
zip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
A valueForNoneA,
B valueForNoneB,
BiFunction<? super A,? super B,R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <A,B,R> Stream<R> |
zip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
BiFunction<? super A,? super B,R> zipFunction)
Zip together the "a" and "b" iterators until one of them runs out of values.
|
static <A,B,C,R> Stream<R> |
zip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
java.util.Iterator<? extends C> c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
TriFunction<? super A,? super B,? super C,R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <A,B,C,R> Stream<R> |
zip(java.util.Iterator<? extends A> a,
java.util.Iterator<? extends B> b,
java.util.Iterator<? extends C> c,
TriFunction<? super A,? super B,? super C,R> zipFunction)
Zip together the "a", "b" and "c" iterators until one of them runs out of values.
|
static <T,R> Stream<R> |
zip(java.util.List<? extends java.util.Collection<? extends T>> c,
Function<? super java.util.List<? extends T>,R> zipFunction) |
static <T,R> Stream<R> |
zip(java.util.List<? extends java.util.Collection<? extends T>> c,
java.util.List<? extends T> valuesForNone,
Function<? super java.util.List<? extends T>,R> zipFunction) |
static <R> Stream<R> |
zip(long[] a,
long[] b,
long[] c,
long valueForNoneA,
long valueForNoneB,
long valueForNoneC,
LongTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(long[] a,
long[] b,
long[] c,
LongTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(long[] a,
long[] b,
LongBiFunction<R> zipFunction)
Zip together the "a" and "b" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(long[] a,
long[] b,
long valueForNoneA,
long valueForNoneB,
LongBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(LongIterator a,
LongIterator b,
LongBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(LongIterator a,
LongIterator b,
LongIterator c,
long valueForNoneA,
long valueForNoneB,
long valueForNoneC,
LongTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(LongIterator a,
LongIterator b,
LongIterator c,
LongTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(LongIterator a,
LongIterator b,
long valueForNoneA,
long valueForNoneB,
LongBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(LongStream a,
LongStream b,
LongBiFunction<R> zipFunction)
Zip together the "a" and "b" streams until one of them runs out of values.
|
static <R> Stream<R> |
zip(LongStream a,
LongStream b,
long valueForNoneA,
long valueForNoneB,
LongBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(LongStream a,
LongStream b,
LongStream c,
long valueForNoneA,
long valueForNoneB,
long valueForNoneC,
LongTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(LongStream a,
LongStream b,
LongStream c,
LongTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" streams until one of them runs out of values.
|
static <R> Stream<R> |
zip(short[] a,
short[] b,
short[] c,
short valueForNoneA,
short valueForNoneB,
short valueForNoneC,
ShortTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(short[] a,
short[] b,
short[] c,
ShortTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(short[] a,
short[] b,
ShortBiFunction<R> zipFunction)
Zip together the "a" and "b" arrays until one of them runs out of values.
|
static <R> Stream<R> |
zip(short[] a,
short[] b,
short valueForNoneA,
short valueForNoneB,
ShortBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(ShortIterator a,
ShortIterator b,
ShortBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(ShortIterator a,
ShortIterator b,
ShortIterator c,
short valueForNoneA,
short valueForNoneB,
short valueForNoneC,
ShortTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(ShortIterator a,
ShortIterator b,
ShortIterator c,
ShortTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until one of them runs out of values.
|
static <R> Stream<R> |
zip(ShortIterator a,
ShortIterator b,
short valueForNoneA,
short valueForNoneB,
ShortBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(ShortStream a,
ShortStream b,
ShortBiFunction<R> zipFunction)
Zip together the "a" and "b" streams until one of them runs out of values.
|
static <R> Stream<R> |
zip(ShortStream a,
ShortStream b,
short valueForNoneA,
short valueForNoneB,
ShortBiFunction<R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(ShortStream a,
ShortStream b,
ShortStream c,
short valueForNoneA,
short valueForNoneB,
short valueForNoneC,
ShortTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <R> Stream<R> |
zip(ShortStream a,
ShortStream b,
ShortStream c,
ShortTriFunction<R> zipFunction)
Zip together the "a", "b" and "c" streams until one of them runs out of values.
|
static <A,B,R> Stream<R> |
zip(Stream<? extends A> a,
Stream<? extends B> b,
A valueForNoneA,
B valueForNoneB,
BiFunction<? super A,? super B,R> zipFunction)
Zip together the "a" and "b" iterators until all of them runs out of values.
|
static <A,B,R> Stream<R> |
zip(Stream<? extends A> a,
Stream<? extends B> b,
BiFunction<? super A,? super B,R> zipFunction)
Zip together the "a" and "b" streams until one of them runs out of values.
|
static <A,B,C,R> Stream<R> |
zip(Stream<? extends A> a,
Stream<? extends B> b,
Stream<? extends C> c,
A valueForNoneA,
B valueForNoneB,
C valueForNoneC,
TriFunction<? super A,? super B,? super C,R> zipFunction)
Zip together the "a", "b" and "c" iterators until all of them runs out of values.
|
static <A,B,C,R> Stream<R> |
zip(Stream<? extends A> a,
Stream<? extends B> b,
Stream<? extends C> c,
TriFunction<? super A,? super B,? super C,R> zipFunction)
Zip together the "a", "b" and "c" streams until one of them runs out of values.
|
static <T,R> Stream<R> |
zipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c,
Function<? super java.util.List<? extends T>,R> zipFunction) |
static <T,R> Stream<R> |
zipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c,
java.util.List<? extends T> valuesForNone,
Function<? super java.util.List<? extends T>,R> zipFunction) |
abstract <T2,R> Stream<R> |
zipWith(Stream<T2> b,
BiFunction<? super T,? super T2,R> zipFunction) |
abstract <T2,T3,R> Stream<R> |
zipWith(Stream<T2> b,
Stream<T3> c,
TriFunction<? super T,? super T2,? super T3,R> zipFunction) |
abstract <T2,T3,R> Stream<R> |
zipWith(Stream<T2> b,
Stream<T3> c,
T valueForNoneA,
T2 valueForNoneB,
T3 valueForNoneC,
TriFunction<? super T,? super T2,? super T3,R> zipFunction) |
abstract <T2,R> Stream<R> |
zipWith(Stream<T2> b,
T valueForNoneA,
T2 valueForNoneB,
BiFunction<? super T,? super T2,R> zipFunction) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, appendIfEmpty, count, difference, distinct, dropWhile, dropWhile, filter, first, indexed, intersection, join, last, limit, onClose, onlyOne, parallel, parallel, peek, percentiles, prepend, removeIf, removeIf, reversed, reverseSorted, rotated, shuffled, skip, skip, sliding, slidingToList, sorted, split, split, splitAt, splitBy, splitToList, splitToList, step, symmetricDifference, takeWhile, toArray, toCollection, toList, toLongMultiset, toLongMultiset, toMultiset, toMultiset, toSet
@SequentialOnly public <U> Stream<U> select(java.lang.Class<U> targetType)
@ParallelSupported public abstract <R> Stream<R> slidingMap(BiFunction<? super T,? super T,R> mapper)
@ParallelSupported public abstract <R> Stream<R> slidingMap(BiFunction<? super T,? super T,R> mapper, int increment)
windowSize = 2
and the specified increment
, then map
by the specified mapper
.mapper
- increment
- @ParallelSupported public abstract <R> Stream<R> slidingMap(BiFunction<? super T,? super T,R> mapper, int increment, boolean ignoreNotPaired)
@ParallelSupported public abstract <R> Stream<R> slidingMap(TriFunction<? super T,? super T,? super T,R> mapper)
@ParallelSupported public abstract <R> Stream<R> slidingMap(TriFunction<? super T,? super T,? super T,R> mapper, int increment)
windowSize = 3
and the specified increment
, then map
by the specified mapper
.mapper
- increment
- @ParallelSupported public abstract <R> Stream<R> slidingMap(TriFunction<? super T,? super T,? super T,R> mapper, int increment, boolean ignoreNotPaired)
@SequentialOnly public abstract <U> Stream<U> rangeMap(BiPredicate<? super T,? super T> sameRange, BiFunction<? super T,? super T,? extends U> mapper)
Stream.of("a", "ab", "ac", "b", "c", "cb").rangeMap((a, b) -> b.startsWith(a), (a, b) -> a + "->" + b).toList(); // a->ac, b->b, c->cb
This is a quasi-intermediate partial reduction operation.
U
- the type of the resulting elementssameRange
- a non-interfering, stateless predicate to apply to
the leftmost and next elements which returns true for elements
which belong to the same range.mapper
- a non-interfering, stateless function to apply to the
range borders and produce the resulting element. If value was
not merged to the interval, then mapper will receive the same
value twice, otherwise it will receive the leftmost and the
rightmost values which were merged to the range.#collapse(BiPredicate, BinaryOperator)
@ParallelSupported public abstract Stream<T> mapFirst(Function<? super T,? extends T> mapperForFirst)
@ParallelSupported public abstract <R> Stream<R> mapFirstOrElse(Function<? super T,? extends R> mapperForFirst, Function<? super T,? extends R> mapperForElse)
@ParallelSupported public abstract Stream<T> mapLast(Function<? super T,? extends T> mapperForLast)
@ParallelSupported public abstract <R> Stream<R> mapLastOrElse(Function<? super T,? extends R> mapperForLast, Function<? super T,? extends R> mapperForElse)
@ParallelSupported public abstract CharStream mapToChar(ToCharFunction<? super T> mapper)
@ParallelSupported public abstract ByteStream mapToByte(ToByteFunction<? super T> mapper)
@ParallelSupported public abstract ShortStream mapToShort(ToShortFunction<? super T> mapper)
@ParallelSupported public abstract IntStream mapToInt(ToIntFunction<? super T> mapper)
@ParallelSupported public abstract LongStream mapToLong(ToLongFunction<? super T> mapper)
@ParallelSupported public abstract FloatStream mapToFloat(ToFloatFunction<? super T> mapper)
@ParallelSupported public abstract DoubleStream mapToDouble(ToDoubleFunction<? super T> mapper)
@ParallelSupported public abstract <K,V> EntryStream<K,V> mapToEntry(Function<? super T,? extends java.util.Map.Entry<? extends K,? extends V>> mapper)
@ParallelSupported public abstract <K,V> EntryStream<K,V> mapToEntry(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
@ParallelSupported public abstract <R> Stream<R> flatMap(Function<? super T,? extends Stream<? extends R>> mapper)
@ParallelSupported public abstract <R> Stream<R> flattMap(Function<? super T,? extends java.util.Collection<? extends R>> mapper)
@ParallelSupported public abstract CharStream flatMapToChar(Function<? super T,? extends CharStream> mapper)
@ParallelSupported public abstract CharStream flattMapToChar(Function<? super T,char[]> mapper)
@ParallelSupported public abstract ByteStream flatMapToByte(Function<? super T,? extends ByteStream> mapper)
@ParallelSupported public abstract ByteStream flattMapToByte(Function<? super T,byte[]> mapper)
@ParallelSupported public abstract ShortStream flatMapToShort(Function<? super T,? extends ShortStream> mapper)
@ParallelSupported public abstract ShortStream flattMapToShort(Function<? super T,short[]> mapper)
@ParallelSupported public abstract IntStream flatMapToInt(Function<? super T,? extends IntStream> mapper)
@ParallelSupported public abstract IntStream flattMapToInt(Function<? super T,int[]> mapper)
@ParallelSupported public abstract LongStream flatMapToLong(Function<? super T,? extends LongStream> mapper)
@ParallelSupported public abstract LongStream flattMapToLong(Function<? super T,long[]> mapper)
@ParallelSupported public abstract FloatStream flatMapToFloat(Function<? super T,? extends FloatStream> mapper)
@ParallelSupported public abstract FloatStream flattMapToFloat(Function<? super T,float[]> mapper)
@ParallelSupported public abstract DoubleStream flatMapToDouble(Function<? super T,? extends DoubleStream> mapper)
@ParallelSupported public abstract DoubleStream flattMapToDouble(Function<? super T,double[]> mapper)
@ParallelSupported public abstract <K,V> EntryStream<K,V> flatMapToEntry(Function<? super T,? extends Stream<? extends java.util.Map.Entry<? extends K,? extends V>>> mapper)
@ParallelSupported public abstract <K,V> EntryStream<K,V> flattMapToEntry(Function<? super T,? extends java.util.Map<? extends K,? extends V>> mapper)
@ParallelSupported public abstract <K,V> EntryStream<K,V> flatMappToEntry(Function<? super T,? extends EntryStream<? extends K,? extends V>> mapper)
@ParallelSupported public abstract <K> Stream<java.util.Map.Entry<K,java.util.List<T>>> groupBy(Function<? super T,? extends K> keyMapper)
@ParallelSupported public abstract <K> Stream<java.util.Map.Entry<K,java.util.List<T>>> groupBy(Function<? super T,? extends K> keyMapper, Supplier<? extends java.util.Map<K,java.util.List<T>>> mapFactory)
@ParallelSupported public abstract <K,V> Stream<java.util.Map.Entry<K,java.util.List<V>>> groupBy(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
keyMapper
- valueMapper
- Collectors.toMultimap(Function, Function)
@ParallelSupported public abstract <K,V> Stream<java.util.Map.Entry<K,java.util.List<V>>> groupBy(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, Supplier<? extends java.util.Map<K,java.util.List<V>>> mapFactory)
keyMapper
- valueMapper
- mapFactory
- Collectors.toMultimap(Function, Function, Supplier)
@ParallelSupported public abstract <K,A,D> Stream<java.util.Map.Entry<K,D>> groupBy(Function<? super T,? extends K> keyMapper, Collector<? super T,A,D> downstream)
@ParallelSupported public abstract <K,A,D> Stream<java.util.Map.Entry<K,D>> groupBy(Function<? super T,? extends K> keyMapper, Collector<? super T,A,D> downstream, Supplier<? extends java.util.Map<K,D>> mapFactory)
@ParallelSupported public abstract <K,V,A,D> Stream<java.util.Map.Entry<K,D>> groupBy(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, Collector<? super V,A,D> downstream)
@ParallelSupported public abstract <K,V,A,D> Stream<java.util.Map.Entry<K,D>> groupBy(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, Collector<? super V,A,D> downstream, Supplier<? extends java.util.Map<K,D>> mapFactory)
@ParallelSupported public abstract <K,V> Stream<java.util.Map.Entry<K,V>> groupBy(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, BinaryOperator<V> mergeFunction)
@ParallelSupported public abstract <K,V> Stream<java.util.Map.Entry<K,V>> groupBy(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, BinaryOperator<V> mergeFunction, Supplier<? extends java.util.Map<K,V>> mapFactory)
@ParallelSupported public abstract Stream<java.util.Map.Entry<java.lang.Boolean,java.util.List<T>>> partitionBy(Predicate<? super T> predicate)
predicate
- Collectors.partitioningBy(Predicate)
@ParallelSupported public abstract <A,D> Stream<java.util.Map.Entry<java.lang.Boolean,D>> partitionBy(Predicate<? super T> predicate, Collector<? super T,A,D> downstream)
predicate
- downstream
- Collectors.partitioningBy(Predicate, Collector)
@ParallelSupported public <K> Stream<java.util.Map.Entry<K,java.lang.Integer>> countBy(Function<? super T,? extends K> keyMapper)
@ParallelSupported public abstract <K> EntryStream<K,java.util.List<T>> groupByToEntry(Function<? super T,? extends K> keyMapper)
@ParallelSupported public abstract <K> EntryStream<K,java.util.List<T>> groupByToEntry(Function<? super T,? extends K> keyMapper, Supplier<? extends java.util.Map<K,java.util.List<T>>> mapFactory)
@ParallelSupported public abstract <K,V> EntryStream<K,java.util.List<V>> groupByToEntry(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
keyMapper
- valueMapper
- Collectors.toMultimap(Function, Function)
@ParallelSupported public abstract <K,V> EntryStream<K,java.util.List<V>> groupByToEntry(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, Supplier<? extends java.util.Map<K,java.util.List<V>>> mapFactory)
keyMapper
- valueMapper
- mapFactory
- Collectors.toMultimap(Function, Function, Supplier)
@ParallelSupported public abstract <K,A,D> EntryStream<K,D> groupByToEntry(Function<? super T,? extends K> keyMapper, Collector<? super T,A,D> downstream)
@ParallelSupported public abstract <K,A,D> EntryStream<K,D> groupByToEntry(Function<? super T,? extends K> keyMapper, Collector<? super T,A,D> downstream, Supplier<? extends java.util.Map<K,D>> mapFactory)
@ParallelSupported public abstract <K,V,A,D> EntryStream<K,D> groupByToEntry(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, Collector<? super V,A,D> downstream)
@ParallelSupported public abstract <K,V,A,D> EntryStream<K,D> groupByToEntry(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, Collector<? super V,A,D> downstream, Supplier<? extends java.util.Map<K,D>> mapFactory)
@ParallelSupported public abstract <K,V> EntryStream<K,V> groupByToEntry(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, BinaryOperator<V> mergeFunction)
@ParallelSupported public abstract <K,V> EntryStream<K,V> groupByToEntry(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, BinaryOperator<V> mergeFunction, Supplier<? extends java.util.Map<K,V>> mapFactory)
@ParallelSupported public abstract EntryStream<java.lang.Boolean,java.util.List<T>> partitionByToEntry(Predicate<? super T> predicate)
predicate
- Collectors.partitioningBy(Predicate)
@ParallelSupported public abstract <A,D> EntryStream<java.lang.Boolean,D> partitionByToEntry(Predicate<? super T> predicate, Collector<? super T,A,D> downstream)
predicate
- downstream
- Collectors.partitioningBy(Predicate, Collector)
@ParallelSupported public <K> EntryStream<K,java.lang.Integer> countByToEntry(Function<? super T,? extends K> keyMapper)
@SequentialOnly public abstract Stream<Stream<T>> collapse(BiPredicate<? super T,? super T> collapsible)
@SequentialOnly public abstract <C extends java.util.Collection<T>> Stream<C> collapse(BiPredicate<? super T,? super T> collapsible, Supplier<? extends C> supplier)
@SequentialOnly public abstract Stream<T> collapse(BiPredicate<? super T,? super T> collapsible, BiFunction<? super T,? super T,T> mergeFunction)
Example:
Stream.of(new Integer[0]).collapse((a, b) -> a < b, (a, b) -> a + b) => []
Stream.of(1).collapse((a, b) -> a < b, (a, b) -> a + b) => [1]
Stream.of(1, 2).collapse((a, b) -> a < b, (a, b) -> a + b) => [3]
Stream.of(1, 2, 3).collapse((a, b) -> a < b, (a, b) -> a + b) => [6]
Stream.of(1, 2, 3, 3, 2, 1).collapse((a, b) -> a < b, (a, b) -> a + b) => [6, 3, 2, 1]
collapsible
- mergeFunction
- @SequentialOnly public abstract <U> Stream<U> collapse(BiPredicate<? super T,? super T> collapsible, U init, BiFunction<U,? super T,U> op)
@SequentialOnly public abstract <R> Stream<R> collapse(BiPredicate<? super T,? super T> collapsible, Supplier<R> supplier, BiConsumer<? super R,? super T> accumulator)
@SequentialOnly public abstract <R,A> Stream<R> collapse(BiPredicate<? super T,? super T> collapsible, Collector<? super T,A,R> collector)
Example:
Stream.of(new Integer[0]).collapse((a, b) -> a < b, Collectors.summingInt(Fn.unboxI())) => []
Stream.of(1).collapse((a, b) -> a < b, Collectors.summingInt(Fn.unboxI())) => [1]
Stream.of(1, 2).collapse((a, b) -> a < b, Collectors.summingInt(Fn.unboxI())) => [3]
Stream.of(1, 2, 3).collapse((a, b) -> a < b, Collectors.summingInt(Fn.unboxI())) => [6]
Stream.of(1, 2, 3, 3, 2, 1).collapse((a, b) -> a < b, Collectors.summingInt(Fn.unboxI())) => [6, 3, 2, 1]
collapsible
- collector
- @SequentialOnly public abstract Stream<T> scan(BiFunction<? super T,? super T,T> accumulator)
Stream
produced by iterative application of a accumulation function
to an initial element init
and next element of the current stream.
Produces a Stream
consisting of init
, acc(init, value1)
,
acc(acc(init, value1), value2)
, etc.
This is an intermediate operation.
Example:
Stream.of(new Integer[0]).scan((a, b) -> a + b) => []
Stream.of(1).scan((a, b) -> a + b) => [1]
Stream.of(1, 2).scan((a, b) -> a + b) => [1, 3]
Stream.of(1, 2, 3).scan((a, b) -> a + b) => [1, 3, 6]
Stream.of(1, 2, 3, 3, 2, 1).scan((a, b) -> a + b) => [1, 3, 6, 9, 11, 12]
accumulator
- the accumulation function@SequentialOnly public abstract <U> Stream<U> scan(U init, BiFunction<U,? super T,U> accumulator)
Stream
produced by iterative application of a accumulation function
to an initial element init
and next element of the current stream.
Produces a Stream
consisting of init
, acc(init, value1)
,
acc(acc(init, value1), value2)
, etc.
This is an intermediate operation.
Example:
Stream.of(new Integer[0]).scan(10, (a, b) -> a + b) => []
Stream.of(1).scan(10, (a, b) -> a + b) => [11]
Stream.of(1, 2).scan(10, (a, b) -> a + b) => [11, 13]
Stream.of(1, 2, 3).scan(10, (a, b) -> a + b) => [11, 13, 16]
Stream.of(1, 2, 3, 3, 2, 1).scan(10, (a, b) -> a + b) => [11, 13, 16, 19, 21, 22]
init
- the initial value. it's only used once by accumulator
to calculate the fist element in the returned stream.
It will be ignored if this stream is empty and won't be the first element of the returned stream.accumulator
- the accumulation function@SequentialOnly public abstract <U> Stream<U> scan(U init, BiFunction<U,? super T,U> accumulator, boolean initIncluded)
init
- accumulator
- initIncluded
- @SequentialOnly public abstract Stream<java.util.Set<T>> splitToSet(int chunkSize)
chunkSize
- the desired size of each sub sequence (the last may be smaller).@SequentialOnly public abstract <C extends java.util.Collection<T>> Stream<C> split(int chunkSize, IntFunction<? extends C> collectionSupplier)
chunkSize
- the desired size of each sub sequence (the last may be smaller).collectionSupplier
- @SequentialOnly public abstract <A,R> Stream<R> split(int chunkSize, Collector<? super T,A,R> collector)
chunkSize
- the desired size of each sub sequence (the last may be smaller).collector
- @SequentialOnly public abstract Stream<java.util.Set<T>> splitToSet(Predicate<? super T> predicate)
@SequentialOnly public abstract <C extends java.util.Collection<T>> Stream<C> split(Predicate<? super T> predicate, Supplier<? extends C> collectionSupplier)
@SequentialOnly public abstract <A,R> Stream<R> split(Predicate<? super T> predicate, Collector<? super T,A,R> collector)
@SequentialOnly public abstract <A,R> Stream<R> splitAt(int where, Collector<? super T,A,R> collector)
@SequentialOnly public abstract <A,R> Stream<R> splitBy(Predicate<? super T> where, Collector<? super T,A,R> collector)
@SequentialOnly public abstract <C extends java.util.Collection<T>> Stream<C> sliding(int windowSize, IntFunction<? extends C> collectionSupplier)
@SequentialOnly public abstract <C extends java.util.Collection<T>> Stream<C> sliding(int windowSize, int increment, IntFunction<? extends C> collectionSupplier)
@SequentialOnly public abstract <A,R> Stream<R> sliding(int windowSize, Collector<? super T,A,R> collector)
@SequentialOnly public abstract <A,R> Stream<R> sliding(int windowSize, int increment, Collector<? super T,A,R> collector)
@SequentialOnly public abstract Stream<Stream<T>> window(Duration duration)
duration
- Fn.window(Duration, LongSupplier)
@SequentialOnly public abstract Stream<Stream<T>> window(Duration duration, LongSupplier startTime)
duration
- startTime
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract Stream<java.util.List<T>> windowToList(Duration duration)
duration
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract Stream<java.util.Set<T>> windowToSet(Duration duration)
duration
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <C extends java.util.Collection<T>> Stream<C> window(Duration duration, Supplier<? extends C> collectionSupplier)
duration
- collectionSupplier
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <C extends java.util.Collection<T>> Stream<C> window(Duration duration, LongSupplier startTime, Supplier<? extends C> collectionSupplier)
duration
- startTime
- collectionSupplier
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <A,R> Stream<R> window(Duration duration, Collector<? super T,A,R> collector)
duration
- collector
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <A,R> Stream<R> window(Duration duration, LongSupplier startTime, Collector<? super T,A,R> collector)
duration
- startTime
- collector
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract Stream<Stream<T>> window(Duration duration, long incrementInMillis)
duration
- incrementInMillis
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract Stream<Stream<T>> window(Duration duration, long incrementInMillis, LongSupplier startTime)
duration
- incrementInMillis
- startTime
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract Stream<java.util.List<T>> windowToList(Duration duration, long incrementInMillis)
duration
- incrementInMillis
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract Stream<java.util.Set<T>> windowToSet(Duration duration, long incrementInMillis)
duration
- incrementInMillis
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <C extends java.util.Collection<T>> Stream<C> window(Duration duration, long incrementInMillis, Supplier<? extends C> collectionSupplier)
duration
- incrementInMillis
- collectionSupplier
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <C extends java.util.Collection<T>> Stream<C> window(Duration duration, long incrementInMillis, LongSupplier startTime, Supplier<? extends C> collectionSupplier)
duration
- incrementInMillis
- startTime
- collectionSupplier
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <A,R> Stream<R> window(Duration duration, long incrementInMillis, Collector<? super T,A,R> collector)
duration
- incrementInMillis
- collector
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <A,R> Stream<R> window(Duration duration, long incrementInMillis, LongSupplier startTime, Collector<? super T,A,R> collector)
duration
- incrementInMillis
- startTime
- collector
- window(Duration)
,
Fn.window(Duration, LongSupplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract Stream<Stream<T>> window(int maxWindowSize, Duration maxDuration)
maxWindowSize
- maxDuration
- window(int, Duration, LongSupplier, Supplier)
,
Fn.window(int, Duration, LongSupplier, Supplier)
@SequentialOnly public abstract Stream<Stream<T>> window(int maxWindowSize, Duration maxDuration, LongSupplier startTime)
maxWindowSize
- maxDuration
- startTime
- window(int, Duration, LongSupplier, Supplier)
,
Fn.window(int, Duration, LongSupplier, Supplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <C extends java.util.Collection<T>> Stream<C> window(int maxWindowSize, Duration maxDuration, Supplier<? extends C> collectionSupplier)
maxWindowSize
- maxDuration
- collectionSupplier
- window(int, Duration, LongSupplier, Supplier)
,
Fn.window(int, Duration, LongSupplier, Supplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <C extends java.util.Collection<T>> Stream<C> window(int maxWindowSize, Duration maxDuration, LongSupplier startTime, Supplier<? extends C> collectionSupplier)
maxWindowSize
or maxDuration
reaches first.maxWindowSize
- maxDuration
- startTime
- collectionSupplier
- window(int, Duration, LongSupplier, Supplier)
,
Fn.window(int, Duration, LongSupplier, Supplier)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <A,R> Stream<R> window(int maxWindowSize, Duration maxDuration, Collector<? super T,A,R> collector)
maxWindowSize
- maxDuration
- collector
- window(int, Duration, LongSupplier, Collector)
,
Fn.window(int, Duration, LongSupplier, Collector)
,
sliding(int, int, Collector)
@SequentialOnly public abstract <A,R> Stream<R> window(int maxWindowSize, Duration maxDuration, LongSupplier startTime, Collector<? super T,A,R> collector)
maxWindowSize
or maxDuration
reaches first.maxWindowSize
- maxDuration
- startTime
- collector
- window(Duration, long, LongSupplier, Collector)
,
Fn.window(int, Duration, LongSupplier, Collector)
,
sliding(int, int, Collector)
@SequentialOnly public abstract Stream<T> intersperse(T delimiter)
Stream.of(1).intersperse(9) --> [1]
Stream.of(1, 2, 3).intersperse(9) --> [1, 9, 2, 9, 3]
delimiter
- @ParallelSupported public Stream<T> distinct(Predicate<? super java.lang.Long> occurrencesFilter)
occurrencesFilter
- @ParallelSupported public abstract Stream<T> distinctBy(Function<? super T,?> keyMapper)
keyMapper
keyMapper
- don't change value of the input parameter.public <K> Stream<T> distinctBy(Function<? super T,K> keyMapper, Predicate<? super java.lang.Long> occurrencesFilter)
keyMapper
- occurrencesFilter
- @SequentialOnly public abstract Stream<T> top(int n)
n
- @SequentialOnly public abstract Stream<T> top(int n, java.util.Comparator<? super T> comparator)
n
- comparator
- @ParallelSupported public abstract Stream<T> sorted(java.util.Comparator<? super T> comparator)
@ParallelSupported public abstract Stream<T> sortedBy(Function<? super T,? extends java.lang.Comparable> keyMapper)
@ParallelSupported public abstract Stream<T> sortedByInt(ToIntFunction<? super T> keyMapper)
@ParallelSupported public abstract Stream<T> sortedByLong(ToLongFunction<? super T> keyMapper)
@ParallelSupported public abstract Stream<T> sortedByDouble(ToDoubleFunction<? super T> keyMapper)
@ParallelSupported public abstract <E extends java.lang.Exception> void forEach(Try.Consumer<? super T,E> action) throws E extends java.lang.Exception
E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception,E2 extends java.lang.Exception> void forEach(Try.Consumer<? super T,E> action, Try.Runnable<E2> onComplete) throws E extends java.lang.Exception, E2 extends java.lang.Exception
E extends java.lang.Exception
public abstract <U,E extends java.lang.Exception,E2 extends java.lang.Exception> void forEach(Try.Function<? super T,? extends java.util.Collection<U>,E> flatMapper, Try.BiConsumer<? super T,? super U,E2> action) throws E extends java.lang.Exception, E2 extends java.lang.Exception
E extends java.lang.Exception
public abstract <T2,T3,E extends java.lang.Exception,E2 extends java.lang.Exception,E3 extends java.lang.Exception> void forEach(Try.Function<? super T,? extends java.util.Collection<T2>,E> flatMapper, Try.Function<? super T2,? extends java.util.Collection<T3>,E2> flatMapper2, Try.TriConsumer<? super T,? super T2,? super T3,E3> action) throws E extends java.lang.Exception, E2 extends java.lang.Exception, E3 extends java.lang.Exception
E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception> void forEachPair(Try.BiConsumer<? super T,? super T,E> action) throws E extends java.lang.Exception
E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception> void forEachPair(Try.BiConsumer<? super T,? super T,E> action, int increment) throws E extends java.lang.Exception
windowSize = 2
and the specified increment
, then consume
by the specified mapper
.mapper
- increment
- E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception> void forEachTriple(Try.TriConsumer<? super T,? super T,? super T,E> action) throws E extends java.lang.Exception
E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception> void forEachTriple(Try.TriConsumer<? super T,? super T,? super T,E> action, int increment) throws E extends java.lang.Exception
windowSize = 3
and the specified increment
, then consume
by the specified mapper
.mapper
- increment
- E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception> boolean anyMatch(Try.Predicate<? super T,E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception> boolean allMatch(Try.Predicate<? super T,E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception> boolean noneMatch(Try.Predicate<? super T,E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception> boolean nMatch(long atLeast, long atMost, Try.Predicate<? super T,E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception> u.Optional<T> findFirst(Try.Predicate<? super T,E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception> u.Optional<T> findLast(Try.Predicate<? super T,E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
@SequentialOnly public abstract <E extends java.lang.Exception,E2 extends java.lang.Exception> u.Optional<T> findFirstOrLast(Try.Predicate<? super T,E> predicateForFirst, Try.Predicate<? super T,E2> predicateForLast) throws E extends java.lang.Exception, E2 extends java.lang.Exception
E extends java.lang.Exception
@SequentialOnly public abstract <U,E extends java.lang.Exception,E2 extends java.lang.Exception> u.Optional<T> findFirstOrLast(U init, Try.BiPredicate<? super T,? super U,E> predicateForFirst, Try.BiPredicate<? super T,? super U,E2> predicateForLast) throws E extends java.lang.Exception, E2 extends java.lang.Exception
init
- predicateForFirst
- predicateForLast
- E extends java.lang.Exception
@SequentialOnly public abstract <U,E extends java.lang.Exception,E2 extends java.lang.Exception> u.Optional<T> findFirstOrLast(Function<? super T,U> preFunc, Try.BiPredicate<? super T,? super U,E> predicateForFirst, Try.BiPredicate<? super T,? super U,E2> predicateForLast) throws E extends java.lang.Exception, E2 extends java.lang.Exception
preFunc
- predicateForFirst
- predicateForLast
- E extends java.lang.Exception
@ParallelSupported public abstract <E extends java.lang.Exception> u.Optional<T> findAny(Try.Predicate<? super T,E> predicate) throws E extends java.lang.Exception
E extends java.lang.Exception
@SequentialOnly public abstract boolean containsAll(T... a)
@SequentialOnly public abstract boolean containsAll(java.util.Collection<? extends T> c)
@SequentialOnly public abstract <A> A[] toArray(IntFunction<A[]> generator)
@ParallelSupported public <K,V> ImmutableMap<K,V> toImmutableMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
keyMapper
- valueMapper
- Collectors.toMap(Function, Function)
@ParallelSupported public <K,V> ImmutableMap<K,V> toImmutableMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, BinaryOperator<V> mergeFunction)
keyMapper
- valueMapper
- mergeFunction
- Collectors.toMap(Function, Function)
@ParallelSupported public abstract <K,V> java.util.Map<K,V> toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
keyMapper
- valueMapper
- Collectors.toMap(Function, Function)
@ParallelSupported public abstract <K,V> java.util.Map<K,V> toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, BinaryOperator<V> mergeFunction)
keyMapper
- valueMapper
- mergeFunction
- Collectors.toMap(Function, Function, BinaryOperator)
@ParallelSupported public abstract <K,V,M extends java.util.Map<K,V>> M toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, Supplier<? extends M> mapFactory)
keyMapper
- valueMapper
- mapFactory
- Collectors.toMap(Function, Function, Supplier)
@ParallelSupported public abstract <K,V,M extends java.util.Map<K,V>> M toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, BinaryOperator<V> mergeFunction, Supplier<? extends M> mapFactory)
keyMapper
- valueMapper
- mergeFunction
- mapFactory
- Collectors.toMap(Function, Function, BinaryOperator, Supplier)
@ParallelSupported public abstract <K,A,D> java.util.Map<K,D> toMap(Function<? super T,? extends K> keyMapper, Collector<? super T,A,D> downstream)
keyMapper
- downstream
- Collectors.groupingBy(Function, Collector)
@ParallelSupported public abstract <K,A,D,M extends java.util.Map<K,D>> M toMap(Function<? super T,? extends K> keyMapper, Collector<? super T,A,D> downstream, Supplier<? extends M> mapFactory)
keyMapper
- downstream
- mapFactory
- Collectors.groupingBy(Function, Collector, Supplier)
@ParallelSupported public abstract <K,V,A,D> java.util.Map<K,D> toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, Collector<? super V,A,D> downstream)
keyMapper
- valueMapper
- downstream
- Collectors.groupingBy(Function, Collector)
@ParallelSupported public abstract <K,V,A,D,M extends java.util.Map<K,D>> M toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, Collector<? super V,A,D> downstream, Supplier<? extends M> mapFactory)
keyMapper
- valueMapper
- downstream
- mapFactory
- Collectors.groupingBy(Function, Collector, Supplier)
@ParallelSupported public abstract <K> java.util.Map<K,java.util.List<T>> groupTo(Function<? super T,? extends K> keyMapper)
keyMapper
- Collectors.groupingBy(Function)
@ParallelSupported public abstract <K,M extends java.util.Map<K,java.util.List<T>>> M groupTo(Function<? super T,? extends K> keyMapper, Supplier<? extends M> mapFactory)
keyMapper
- mapFactory
- Collectors.groupingBy(Function, Supplier)
@ParallelSupported public abstract <K,V> java.util.Map<K,java.util.List<V>> groupTo(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
@ParallelSupported public abstract <K,V,M extends java.util.Map<K,java.util.List<V>>> M groupTo(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, Supplier<? extends M> mapFactory)
keyMapper
- valueMapper
- mapFactory
- Collectors.toMultimap(Function, Function, Supplier)
@ParallelSupported public abstract java.util.Map<java.lang.Boolean,java.util.List<T>> partitionTo(Predicate<? super T> predicate)
predicate
- Collectors.partitioningBy(Predicate)
@ParallelSupported public abstract <A,D> java.util.Map<java.lang.Boolean,D> partitionTo(Predicate<? super T> predicate, Collector<? super T,A,D> downstream)
predicate
- downstream
- Collectors.partitioningBy(Predicate, Collector)
@ParallelSupported public abstract <K> ListMultimap<K,T> toMultimap(Function<? super T,? extends K> keyMapper)
keyMapper
- Collectors.toMultimap(Function, Function)
@ParallelSupported public abstract <K,V extends java.util.Collection<T>,M extends Multimap<K,T,V>> M toMultimap(Function<? super T,? extends K> keyMapper, Supplier<? extends M> mapFactory)
keyMapper
- mapFactory
- Collectors.toMultimap(Function, Function, Supplier)
@ParallelSupported public abstract <K,V> ListMultimap<K,V> toMultimap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
keyMapper
- valueMapper
- Collectors.toMultimap(Function, Function)
@ParallelSupported public abstract <K,V,C extends java.util.Collection<V>,M extends Multimap<K,V,C>> M toMultimap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, Supplier<? extends M> mapFactory)
keyMapper
- valueMapper
- mapFactory
- Collectors.toMultimap(Function, Function, Supplier)
@ParallelSupported public abstract <K> ListMultimap<K,T> flatToMultimap(Function<? super T,? extends Stream<? extends K>> flatKeyMapper)
flatKeyMapper
- Collectors.toMultimap(Function, Function)
@ParallelSupported public abstract <K,V extends java.util.Collection<T>,M extends Multimap<K,T,V>> M flatToMultimap(Function<? super T,? extends Stream<? extends K>> flatKeyMapper, Supplier<? extends M> mapFactory)
flatKeyMapper
- mapFactory
- Collectors.toMultimap(Function, Function, Supplier)
@ParallelSupported public abstract <K,V> ListMultimap<K,V> flatToMultimap(Function<? super T,? extends Stream<? extends K>> flatKeyMapper, BiFunction<? super K,? super T,? extends V> valueMapper)
flatKeyMapper
- valueMapper
- Collectors.toMultimap(Function, Function)
@ParallelSupported public abstract <K,V,C extends java.util.Collection<V>,M extends Multimap<K,V,C>> M flatToMultimap(Function<? super T,? extends Stream<? extends K>> flatKeyMapper, BiFunction<? super K,? super T,? extends V> valueMapper, Supplier<? extends M> mapFactory)
flatKeyMapper
- valueMapper
- mapFactory
- Collectors.toMultimap(Function, Function, Supplier)
@ParallelSupported public abstract <K> ListMultimap<K,T> flattToMultimap(Function<? super T,? extends java.util.Collection<? extends K>> flatKeyMapper)
flatKeyMapper
- Collectors.toMultimap(Function, Function)
@ParallelSupported public abstract <K,V extends java.util.Collection<T>,M extends Multimap<K,T,V>> M flattToMultimap(Function<? super T,? extends java.util.Collection<? extends K>> flatKeyMapper, Supplier<? extends M> mapFactory)
flatKeyMapper
- mapFactory
- Collectors.toMultimap(Function, Function, Supplier)
@ParallelSupported public abstract <K,V> ListMultimap<K,V> flattToMultimap(Function<? super T,? extends java.util.Collection<? extends K>> flatKeyMapper, BiFunction<? super K,? super T,? extends V> valueMapper)
flatKeyMapper
- valueMapper
- Collectors.toMultimap(Function, Function)
@ParallelSupported public abstract <K,V,C extends java.util.Collection<V>,M extends Multimap<K,V,C>> M flattToMultimap(Function<? super T,? extends java.util.Collection<? extends K>> flatKeyMapper, BiFunction<? super K,? super T,? extends V> valueMapper, Supplier<? extends M> mapFactory)
flatKeyMapper
- valueMapper
- mapFactory
- Collectors.toMultimap(Function, Function, Supplier)
@SequentialOnly public abstract DataSet toDataSet()
@SequentialOnly public abstract DataSet toDataSet(boolean isFirstTitle)
isFirstTitle
- @SequentialOnly public abstract DataSet toDataSet(java.util.List<java.lang.String> columnNames)
columnNames
- it can be null or empty if this is Map or entity stream.@ParallelSupported public abstract T reduce(T identity, BinaryOperator<T> accumulator)
@ParallelSupported public abstract u.Optional<T> reduce(BinaryOperator<T> accumulator)
@ParallelSupported public abstract <U> U reduce(U identity, BiFunction<U,? super T,U> accumulator, BinaryOperator<U> combiner)
@ParallelSupported public abstract <R> R collect(Supplier<R> supplier, BiConsumer<? super R,? super T> accumulator, BiConsumer<R,R> combiner)
@ParallelSupported public abstract <R> R collect(Supplier<R> supplier, BiConsumer<? super R,? super T> accumulator)
public abstract <R,A> R collect(java.util.stream.Collector<? super T,A,R> collector)
@ParallelSupported public abstract <R,A,RR> RR collectAndThen(Collector<? super T,A,R> downstream, Function<? super R,RR> func)
@ParallelSupported public abstract <R,A,RR> RR collectAndThen(java.util.stream.Collector<? super T,A,R> downstream, java.util.function.Function<? super R,RR> func)
@SequentialOnly public abstract <R> R toListAndThen(Function<? super java.util.List<T>,R> func)
@SequentialOnly public abstract <R> R toSetAndThen(Function<? super java.util.Set<T>,R> func)
@SequentialOnly public abstract Stream<T> last(int n)
n
will be maintained to filter out the last n
elements.
It may cause out of memory error
if n
is big enough.
n
elements and the Stream will be closed after that, if a terminal operation is triggered.n
- @SequentialOnly public abstract Stream<T> skipLast(int n)
n
will be maintained to filter out the last n
elements.
It may cause out of memory error
if n
is big enough.
n
- @ParallelSupported public abstract u.Optional<T> min(java.util.Comparator<? super T> comparator)
@ParallelSupported public u.Optional<T> minBy(Function<? super T,? extends java.lang.Comparable> keyMapper)
@ParallelSupported public abstract u.Optional<T> max(java.util.Comparator<? super T> comparator)
@ParallelSupported public u.Optional<T> maxBy(Function<? super T,? extends java.lang.Comparable> keyMapper)
@ParallelSupported public abstract u.Optional<T> kthLargest(int k, java.util.Comparator<? super T> comparator)
k
- comparator
- @ParallelSupported public abstract int sumInt(ToIntFunction<? super T> mapper)
@ParallelSupported public abstract long sumLong(ToLongFunction<? super T> mapper)
@ParallelSupported public abstract double sumDouble(ToDoubleFunction<? super T> mapper)
@ParallelSupported public abstract u.OptionalDouble averageInt(ToIntFunction<? super T> mapper)
@ParallelSupported public abstract u.OptionalDouble averageLong(ToLongFunction<? super T> mapper)
@ParallelSupported public abstract u.OptionalDouble averageDouble(ToDoubleFunction<? super T> mapper)
@SequentialOnly public abstract u.Optional<java.util.Map<com.landawn.abacus.util.Percentage,T>> percentiles(java.util.Comparator<? super T> comparator)
@SequentialOnly public abstract Stream<java.util.List<T>> combinations()
Stream.of(1, 2, 3).combinations().forEach(Fn.println());
// output
[]
[1]
[2]
[3]
[1, 2]
[1, 3]
[2, 3]
[1, 2, 3]
@SequentialOnly public abstract Stream<java.util.List<T>> combinations(int len)
Stream.of(1, 2, 3).combinations(2).forEach(Fn.println());
// output
[1, 2]
[1, 3]
[2, 3]
len
- @SequentialOnly public abstract Stream<java.util.List<T>> combinations(int len, boolean repeat)
N.cartesianProduct(N.repeat(toList(), len))
if repeat
is true
.
Stream.of(1, 2, 3).combinations(2, true).forEach(Fn.println());
// output
[1, 1]
[1, 2]
[1, 3]
[2, 1]
[2, 2]
[2, 3]
[3, 1]
[3, 2]
[3, 3]
len
- repeat
- @SequentialOnly public abstract Stream<java.util.List<T>> permutations()
Stream.of(1, 2, 3).permutations().forEach(Fn.println());
// output
[1, 2, 3]
[1, 3, 2]
[3, 1, 2]
[3, 2, 1]
[2, 3, 1]
[2, 1, 3]
@SequentialOnly public abstract Stream<java.util.List<T>> orderedPermutations()
Stream.of(1, 2, 3).orderedPermutations().forEach(Fn.println());
// output
[1, 2, 3]
[1, 3, 2]
[2, 1, 3]
[2, 3, 1]
[3, 1, 2]
[3, 2, 1]
@SequentialOnly public abstract Stream<java.util.List<T>> orderedPermutations(java.util.Comparator<? super T> comparator)
@SequentialOnly @SafeVarargs public final Stream<java.util.List<T>> cartesianProduct(java.util.Collection<? extends T>... cs)
@SequentialOnly public abstract Stream<java.util.List<T>> cartesianProduct(java.util.Collection<? extends java.util.Collection<? extends T>> cs)
@ParallelSupported public abstract <U> Stream<Pair<T,U>> innerJoin(java.util.Collection<U> b, Function<? super T,?> leftKeyMapper, Function<? super U,?> rightKeyMapper)
Stream
and m is the size of specified collection b
.b
- leftKeyMapper
- rightKeyMapper
- @ParallelSupported public abstract <U> Stream<Pair<T,U>> innerJoin(java.util.Collection<U> b, BiPredicate<? super T,? super U> predicate)
Stream
and m is the size of specified collection b
.b
- predicate
- @ParallelSupported public abstract <U> Stream<Pair<T,U>> fullJoin(java.util.Collection<U> b, Function<? super T,?> leftKeyMapper, Function<? super U,?> rightKeyMapper)
Stream
and m is the size of specified collection b
.b
- leftKeyMapper
- rightKeyMapper
- @ParallelSupported public abstract <U> Stream<Pair<T,U>> fullJoin(java.util.Collection<U> b, BiPredicate<? super T,? super U> predicate)
Stream
and m is the size of specified collection b
.b
- predicate
- @ParallelSupported public abstract <U> Stream<Pair<T,U>> leftJoin(java.util.Collection<U> b, Function<? super T,?> leftKeyMapper, Function<? super U,?> rightKeyMapper)
Stream
and m is the size of specified collection b
.b
- leftKeyMapper
- rightKeyMapper
- @ParallelSupported public abstract <U> Stream<Pair<T,U>> leftJoin(java.util.Collection<U> b, BiPredicate<? super T,? super U> predicate)
Stream
and m is the size of specified collection b
.b
- predicate
- @ParallelSupported public abstract <U> Stream<Pair<T,U>> rightJoin(java.util.Collection<U> b, Function<? super T,?> leftKeyMapper, Function<? super U,?> rightKeyMapper)
Stream
and m is the size of specified collection b
.b
- leftKeyMapper
- rightKeyMapper
- @ParallelSupported public abstract <U> Stream<Pair<T,U>> rightJoin(java.util.Collection<U> b, BiPredicate<? super T,? super U> predicate)
Stream
and m is the size of specified collection b
.b
- predicate
- @SequentialOnly public abstract boolean hasDuplicates()
@ParallelSupported public abstract Stream<T> intersection(Function<? super T,?> mapper, java.util.Collection<?> c)
mapper
.mapper
- c
- IntList.intersection(IntList)
@ParallelSupported public abstract Stream<T> difference(Function<? super T,?> mapper, java.util.Collection<?> c)
mapper
.mapper
- c
- IntList.difference(IntList)
@SequentialOnly public abstract Stream<T> appendAlll(java.util.Collection<? extends java.util.Collection<? extends T>> cs)
@SequentialOnly public abstract Stream<T> prependAlll(java.util.Collection<? extends java.util.Collection<? extends T>> cs)
@SequentialOnly public abstract Stream<T> appendIfEmpty(java.util.Collection<? extends T> c)
@Beta public abstract <R,E extends java.lang.Exception> u.Optional<R> applyIfNotEmpty(Try.Function<? super Stream<T>,R,E> func) throws E extends java.lang.Exception
func
- E extends java.lang.Exception
@Beta public abstract <E extends java.lang.Exception> void acceptIfNotEmpty(Try.Consumer<? super Stream<T>,E> action) throws E extends java.lang.Exception
action
- E extends java.lang.Exception
@SequentialOnly public abstract Stream<T> queued()
@SequentialOnly public abstract Stream<T> queued(int queueSize)
queueSize
- @SequentialOnly public abstract Stream<T> merge(Stream<? extends T> b, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
b
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.@ParallelSupported public abstract <T2,R> Stream<R> zipWith(Stream<T2> b, BiFunction<? super T,? super T2,R> zipFunction)
@ParallelSupported public abstract <T2,T3,R> Stream<R> zipWith(Stream<T2> b, Stream<T3> c, TriFunction<? super T,? super T2,? super T3,R> zipFunction)
@ParallelSupported public abstract <T2,R> Stream<R> zipWith(Stream<T2> b, T valueForNoneA, T2 valueForNoneB, BiFunction<? super T,? super T2,R> zipFunction)
@ParallelSupported public abstract <T2,T3,R> Stream<R> zipWith(Stream<T2> b, Stream<T3> c, T valueForNoneA, T2 valueForNoneB, T3 valueForNoneC, TriFunction<? super T,? super T2,? super T3,R> zipFunction)
@SequentialOnly public abstract long persist(java.io.File file, Try.Function<? super T,java.lang.String,java.io.IOException> toLine) throws java.io.IOException
java.io.IOException
@SequentialOnly public abstract long persist(java.io.OutputStream os, Try.Function<? super T,java.lang.String,java.io.IOException> toLine) throws java.io.IOException
java.io.IOException
@SequentialOnly public abstract long persist(java.io.Writer writer, Try.Function<? super T,java.lang.String,java.io.IOException> toLine) throws java.io.IOException
java.io.IOException
@SequentialOnly public abstract long persist(java.sql.Connection conn, java.lang.String insertSQL, int batchSize, int batchInterval, JdbcUtil.BiParametersSetter<? super java.sql.PreparedStatement,? super T> stmtSetter) throws java.sql.SQLException
java.sql.SQLException
@SequentialOnly public abstract long persist(java.sql.PreparedStatement stmt, int batchSize, int batchInterval, JdbcUtil.BiParametersSetter<? super java.sql.PreparedStatement,? super T> stmtSetter) throws java.sql.SQLException
java.sql.SQLException
@SequentialOnly public abstract java.util.stream.Stream<T> toJdkStream()
@SequentialOnly public ObjIterator<T> iterator()
public <E extends java.lang.Exception> ContinuableFuture<java.lang.Void> asyncRun(Try.Consumer<? super Stream<T>,E> action)
action
- a terminal operation should be called.public <E extends java.lang.Exception> ContinuableFuture<java.lang.Void> asyncRun(Try.Consumer<? super Stream<T>,E> action, java.util.concurrent.Executor executor)
action
- a terminal operation should be called.executor
- public <R,E extends java.lang.Exception> ContinuableFuture<R> asyncCall(Try.Function<? super Stream<T>,R,E> action)
action
- a terminal operation should be called.public <R,E extends java.lang.Exception> ContinuableFuture<R> asyncCall(Try.Function<? super Stream<T>,R,E> action, java.util.concurrent.Executor executor)
action
- a terminal operation should be called.executor
- @Deprecated @SequentialOnly @Beta public abstract <K,V> Stream<NoCachingNoUpdating.DisposableEntry<K,V>> mapToDisposableEntry(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
DisposableEntry
is created,
and the same entry instance is returned and set with different keys/values during iteration of the returned stream.
The elements only can be retrieved one by one, can't be modified or saved.
The returned Stream doesn't support the operations which require two or more elements at the same time: (e.g. sort/distinct/pairMap/slidingMap/sliding/split/toList/toSet/...).
, and can't be parallel stream.
Operations: filter/map/toMap/groupBy/groupTo/... are supported.keyMapper
- valueMapper
- NoCachingNoUpdating.DisposableEntry
,
NoCachingNoUpdating
public static <T> Stream<T> empty()
public static <T> Stream<T> just(T a)
public static <T> Stream<T> ofNullable(T t)
@SafeVarargs public static <T> Stream<T> of(T... a)
public static <T> Stream<T> of(T[] a, int startIndex, int endIndex)
a
- startIndex
- endIndex
- public static <T> Stream<T> of(java.util.Collection<? extends T> c)
c
- public static <T> Stream<T> of(java.util.Collection<? extends T> c, int startIndex, int endIndex)
c
- startIndex
- endIndex
- public static <K,V> Stream<java.util.Map.Entry<K,V>> of(java.util.Map<K,V> map)
public static <T> Stream<T> of(java.lang.Iterable<? extends T> iterable)
public static <T> Stream<T> of(java.util.Iterator<? extends T> iterator)
iterator
- public static <T> Stream<T> of(java.util.stream.Stream<T> stream)
public static Stream<java.lang.Boolean> of(boolean[] a)
public static Stream<java.lang.Boolean> of(boolean[] a, int fromIndex, int toIndex)
public static Stream<java.lang.Character> of(char[] a)
public static Stream<java.lang.Character> of(char[] a, int fromIndex, int toIndex)
public static Stream<java.lang.Byte> of(byte[] a)
public static Stream<java.lang.Byte> of(byte[] a, int fromIndex, int toIndex)
public static Stream<java.lang.Short> of(short[] a)
public static Stream<java.lang.Short> of(short[] a, int fromIndex, int toIndex)
public static Stream<java.lang.Integer> of(int[] a)
public static Stream<java.lang.Integer> of(int[] a, int fromIndex, int toIndex)
public static Stream<java.lang.Long> of(long[] a)
public static Stream<java.lang.Long> of(long[] a, int fromIndex, int toIndex)
public static Stream<java.lang.Float> of(float[] a)
public static Stream<java.lang.Float> of(float[] a, int fromIndex, int toIndex)
public static Stream<java.lang.Double> of(double[] a)
public static Stream<java.lang.Double> of(double[] a, int fromIndex, int toIndex)
public static <T> Stream<T> of(Supplier<java.util.Collection<? extends T>> supplier)
supplier
- public static <K> Stream<K> ofKeys(java.util.Map<K,?> map)
public static <K,V> Stream<K> ofKeys(java.util.Map<K,V> map, Predicate<? super V> valueFilter)
public static <V> Stream<V> ofValues(java.util.Map<?,V> map)
public static <K,V> Stream<V> ofValues(java.util.Map<K,V> map, Predicate<? super K> keyFilter)
public static <T> Stream<T> flat(java.util.Collection<? extends java.util.Collection<? extends T>> c)
public static <T> Stream<T> flat(T[][] a)
public static <T> Stream<T> flat(T[][] a, boolean vertically)
public static <T> Stream<T> flat(T[][] a, T valueForNone, boolean vertically)
public static <T> Stream<T> flat(T[][][] a)
public static <T> Stream<T> repeat(T element, long n)
public static <T> Stream<T> iterate(BooleanSupplier hasNext, Supplier<? extends T> next)
public static <T> Stream<T> iterate(T init, BooleanSupplier hasNext, UnaryOperator<T> f)
Stream
produced by iterative
application of a function f
to an initial element init
,
producing a Stream
consisting of init
, f(init)
,
f(f(init))
, etc.
The first element (position 0
) in the Stream
will be
the provided init
. For n > 0
, the element at position
n
, will be the result of applying the function f
to the
element at position n - 1
.
init
- hasNext
- f
- public static <T> Stream<T> iterate(T init, Predicate<? super T> hasNext, UnaryOperator<T> f)
init
- hasNext
- test if has next by hasNext.test(init) for first time and hasNext.test(f.apply(previous)) for remaining.f
- public static <T> Stream<T> iterate(T init, UnaryOperator<T> f)
public static <T> Stream<T> interval(long intervalInMillis, Supplier<T> s)
intervalInMillis
- s
- public static <T> Stream<T> interval(long delayInMillis, long intervalInMillis, Supplier<T> s)
delayInMillis
- intervalInMillis
- s
- TimeUnit
public static <T> Stream<T> interval(long delay, long interval, java.util.concurrent.TimeUnit unit, Supplier<T> s)
delay
- interval
- unit
- s
- public static <T> Stream<T> interval(long intervalInMillis, LongFunction<T> s)
public static <T> Stream<T> interval(long delayInMillis, long intervalInMillis, LongFunction<T> s)
delayInMillis
- intervalInMillis
- s
- TimeUnit
public static <T> Stream<T> interval(long delay, long interval, java.util.concurrent.TimeUnit unit, LongFunction<T> s)
delay
- interval
- unit
- s
- public static Stream<java.lang.Object[]> rows(java.sql.ResultSet resultSet) throws UncheckedSQLException
resultSet
after the stream is finished.resultSet
- UncheckedSQLException
public static <T> Stream<T> rows(java.lang.Class<T> targetClass, java.sql.ResultSet resultSet) throws UncheckedSQLException
resultSet
after the stream is finished.targetClass
- Array/List/Map or Entity with getter/setter methods.resultSet
- UncheckedSQLException
public static <T> Stream<T> rows(java.sql.ResultSet resultSet, JdbcUtil.RowMapper<T> rowMapper) throws UncheckedSQLException
resultSet
after the stream is finished.resultSet
- rowMapper
- UncheckedSQLException
public static <T> Stream<T> rows(java.sql.ResultSet resultSet, JdbcUtil.BiRowMapper<T> rowMapper) throws UncheckedSQLException
resultSet
after the stream is finished.resultSet
- rowMapper
- UncheckedSQLException
public static <T> Stream<T> rows(java.sql.ResultSet resultSet, int columnIndex) throws UncheckedSQLException
resultSet
after the stream is finished.resultSet
- columnIndex
- starts from 0, not 1.UncheckedSQLException
public static <T> Stream<T> rows(java.sql.ResultSet resultSet, java.lang.String columnName) throws UncheckedSQLException
resultSet
after the stream is finished.resultSet
- columnName
- UncheckedSQLException
public static Stream<java.lang.String> lines(java.io.File file) throws UncheckedIOException
UncheckedIOException
public static Stream<java.lang.String> lines(java.io.File file, java.nio.charset.Charset charset) throws UncheckedIOException
UncheckedIOException
public static Stream<java.lang.String> lines(java.nio.file.Path path) throws UncheckedIOException
UncheckedIOException
public static Stream<java.lang.String> lines(java.nio.file.Path path, java.nio.charset.Charset charset) throws UncheckedIOException
UncheckedIOException
public static Stream<java.lang.String> lines(java.io.Reader reader) throws UncheckedIOException
reader
after the stream is finished.reader
- UncheckedIOException
public static Stream<java.io.File> listFiles(java.io.File parentPath) throws UncheckedIOException
UncheckedIOException
public static Stream<java.io.File> listFiles(java.io.File parentPath, boolean recursively) throws UncheckedIOException
UncheckedIOException
public static <T> Stream<T> observe(java.util.concurrent.BlockingQueue<T> queue, Duration duration)
public static <T> Stream<T> observe(java.util.concurrent.BlockingQueue<T> queue, Duration duration, java.lang.Runnable onComplete)
final BlockingQueue queue = new ArrayBlockingQueue<>(32);
Stream.observe(queue, Duration.ofMillis(100)).filter(s -> s.startsWith("a")).asyncRun(s -> s.forEach(Fn.println()));
N.asList("a", "b", "ab", "bc", "1", "a").forEach(queue::add);
N.sleep(10);
N.println("==================");
N.sleep(100);
N.println("==================");
N.sleep(10);
queue
- duration
- onComplete
- public static <T> Stream<T> observe(java.util.concurrent.BlockingQueue<T> queue, BooleanSupplier hasMore, long maxWaitIntervalInMillis)
public static <T> Stream<T> observe(java.util.concurrent.BlockingQueue<T> queue, BooleanSupplier hasMore, long maxWaitIntervalInMillis, java.lang.Runnable onComplete)
final BlockingQueue queue = new ArrayBlockingQueue<>(32);
final MutableBoolean hasMore = MutableBoolean.of(true);
Stream.observe(queue, () -> hasMore.value(), 10).filter(s -> s.startsWith("a")).asyncRun(s -> s.forEach(Fn.println()));
N.asList("a", "b", "ab", "bc", "1", "a").forEach(queue::add);
N.println("==================");
hasMore.setFalse();
N.sleep(50);
N.println("==================");
queue
- hasMore
- maxWaitIntervalInMillis
- isCompleted
- it will will be set to true
if Stream is completed and the upstream should not continue to put elements to queue when it's completed.
This is an output parameter.@SafeVarargs public static <T> Stream<T> concat(T[]... a)
@SafeVarargs public static <T> Stream<T> concat(java.util.Collection<? extends T>... a)
@SafeVarargs public static <T> Stream<T> concat(java.util.Iterator<? extends T>... a)
public static <T> Stream<T> concatt(java.util.Collection<? extends java.util.Iterator<? extends T>> c)
@SafeVarargs public static <T> Stream<T> parallelConcat(java.util.Iterator<? extends T>... a)
try (Stream stream = Stream.parallelConcat(a,b, ...)) {
stream.forEach(N::println);
}
a
- public static <T> Stream<T> parallelConcat(java.util.Iterator<? extends T>[] a, int readThreadNum, int queueSize)
try (Stream stream = Stream.parallelConcat(a,b, ...)) {
stream.forEach(N::println);
}
a
- readThreadNum
- - count of threads used to read elements from iterator to queue. Default value is min(8, a.length)queueSize
- Default value is N.min(128, a.length * 16)@SafeVarargs public static <T> Stream<T> parallelConcat(Stream<? extends T>... a)
try (Stream stream = Stream.parallelConcat(a,b, ...)) {
stream.forEach(N::println);
}
a
- public static <T> Stream<T> parallelConcat(Stream<? extends T>[] a, int readThreadNum, int queueSize)
try (Stream stream = Stream.parallelConcat(a,b, ...)) {
stream.forEach(N::println);
}
a
- readThreadNum
- - count of threads used to read elements from iterator to queue. Default value is min(8, a.length)queueSize
- Default value is N.min(128, a.length * 16)public static <T> Stream<T> parallelConcat(java.util.Collection<? extends Stream<? extends T>> c)
try (Stream stream = Stream.parallelConcat(a,b, ...)) {
stream.forEach(N::println);
}
c
- public static <T> Stream<T> parallelConcat(java.util.Collection<? extends Stream<? extends T>> c, int readThreadNum)
try (Stream stream = Stream.parallelConcat(a,b, ...)) {
stream.forEach(N::println);
}
c
- readThreadNum
- public static <T> Stream<T> parallelConcat(java.util.Collection<? extends Stream<? extends T>> c, int readThreadNum, int queueSize)
try (Stream stream = Stream.parallelConcat(a,b, ...)) {
stream.forEach(N::println);
}
a
- readThreadNum
- - count of threads used to read elements from iterator to queue. Default value is min(8, c.size())queueSize
- Default value is N.min(128, c.size() * 16)public static <T> Stream<T> parallelConcatt(java.util.Collection<? extends java.util.Iterator<? extends T>> c)
try (Stream stream = Stream.parallelConcat(a,b, ...)) {
stream.forEach(N::println);
}
c
- public static <T> Stream<T> parallelConcatt(java.util.Collection<? extends java.util.Iterator<? extends T>> c, int readThreadNum)
try (Stream stream = Stream.parallelConcat(a,b, ...)) {
stream.forEach(N::println);
}
c
- readThreadNum
- public static <T> Stream<T> parallelConcatt(java.util.Collection<? extends java.util.Iterator<? extends T>> c, int readThreadNum, int queueSize)
try (Stream stream = Stream.parallelConcat(a,b, ...)) {
stream.forEach(N::println);
}
a
- readThreadNum
- - count of threads used to read elements from iterator to queue. Default value is min(8, c.size())queueSize
- Default value is N.min(128, c.size() * 16)public static <R> Stream<R> zip(char[] a, char[] b, CharBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(char[] a, char[] b, char[] c, CharTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(CharIterator a, CharIterator b, CharBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(CharIterator a, CharIterator b, CharIterator c, CharTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(CharStream a, CharStream b, CharBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(CharStream a, CharStream b, CharStream c, CharTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(java.util.Collection<? extends CharStream> c, CharNFunction<R> zipFunction)
c
- zipFunction
- public static <R> Stream<R> zip(char[] a, char[] b, char valueForNoneA, char valueForNoneB, CharBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(char[] a, char[] b, char[] c, char valueForNoneA, char valueForNoneB, char valueForNoneC, CharTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(CharIterator a, CharIterator b, char valueForNoneA, char valueForNoneB, CharBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(CharIterator a, CharIterator b, CharIterator c, char valueForNoneA, char valueForNoneB, char valueForNoneC, CharTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(CharStream a, CharStream b, char valueForNoneA, char valueForNoneB, CharBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(CharStream a, CharStream b, CharStream c, char valueForNoneA, char valueForNoneB, char valueForNoneC, CharTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(java.util.Collection<? extends CharStream> c, char[] valuesForNone, CharNFunction<R> zipFunction)
c
- valuesForNone
- value to fill for any iterator runs out of values.zipFunction
- public static <R> Stream<R> zip(byte[] a, byte[] b, ByteBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(byte[] a, byte[] b, byte[] c, ByteTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(ByteIterator a, ByteIterator b, ByteBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(ByteIterator a, ByteIterator b, ByteIterator c, ByteTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(ByteStream a, ByteStream b, ByteBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(ByteStream a, ByteStream b, ByteStream c, ByteTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(java.util.Collection<? extends ByteStream> c, ByteNFunction<R> zipFunction)
c
- zipFunction
- public static <R> Stream<R> zip(byte[] a, byte[] b, byte valueForNoneA, byte valueForNoneB, ByteBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(byte[] a, byte[] b, byte[] c, byte valueForNoneA, byte valueForNoneB, byte valueForNoneC, ByteTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(ByteIterator a, ByteIterator b, byte valueForNoneA, byte valueForNoneB, ByteBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(ByteIterator a, ByteIterator b, ByteIterator c, byte valueForNoneA, byte valueForNoneB, byte valueForNoneC, ByteTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(ByteStream a, ByteStream b, byte valueForNoneA, byte valueForNoneB, ByteBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(ByteStream a, ByteStream b, ByteStream c, byte valueForNoneA, byte valueForNoneB, byte valueForNoneC, ByteTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(java.util.Collection<? extends ByteStream> c, byte[] valuesForNone, ByteNFunction<R> zipFunction)
c
- valuesForNone
- value to fill for any iterator runs out of values.zipFunction
- public static <R> Stream<R> zip(short[] a, short[] b, ShortBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(short[] a, short[] b, short[] c, ShortTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(ShortIterator a, ShortIterator b, ShortBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(ShortIterator a, ShortIterator b, ShortIterator c, ShortTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(ShortStream a, ShortStream b, ShortBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(ShortStream a, ShortStream b, ShortStream c, ShortTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(java.util.Collection<? extends ShortStream> c, ShortNFunction<R> zipFunction)
c
- zipFunction
- public static <R> Stream<R> zip(short[] a, short[] b, short valueForNoneA, short valueForNoneB, ShortBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(short[] a, short[] b, short[] c, short valueForNoneA, short valueForNoneB, short valueForNoneC, ShortTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(ShortIterator a, ShortIterator b, short valueForNoneA, short valueForNoneB, ShortBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(ShortIterator a, ShortIterator b, ShortIterator c, short valueForNoneA, short valueForNoneB, short valueForNoneC, ShortTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(ShortStream a, ShortStream b, short valueForNoneA, short valueForNoneB, ShortBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(ShortStream a, ShortStream b, ShortStream c, short valueForNoneA, short valueForNoneB, short valueForNoneC, ShortTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(java.util.Collection<? extends ShortStream> c, short[] valuesForNone, ShortNFunction<R> zipFunction)
c
- valuesForNone
- value to fill for any iterator runs out of values.zipFunction
- public static <R> Stream<R> zip(int[] a, int[] b, IntBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(int[] a, int[] b, int[] c, IntTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(IntIterator a, IntIterator b, IntBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(IntIterator a, IntIterator b, IntIterator c, IntTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(IntStream a, IntStream b, IntBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(IntStream a, IntStream b, IntStream c, IntTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(java.util.Collection<? extends IntStream> c, IntNFunction<R> zipFunction)
c
- zipFunction
- public static <R> Stream<R> zip(int[] a, int[] b, int valueForNoneA, int valueForNoneB, IntBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(int[] a, int[] b, int[] c, int valueForNoneA, int valueForNoneB, int valueForNoneC, IntTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(IntIterator a, IntIterator b, int valueForNoneA, int valueForNoneB, IntBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(IntIterator a, IntIterator b, IntIterator c, int valueForNoneA, int valueForNoneB, int valueForNoneC, IntTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(IntStream a, IntStream b, int valueForNoneA, int valueForNoneB, IntBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(IntStream a, IntStream b, IntStream c, int valueForNoneA, int valueForNoneB, int valueForNoneC, IntTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(java.util.Collection<? extends IntStream> c, int[] valuesForNone, IntNFunction<R> zipFunction)
c
- valuesForNone
- value to fill for any iterator runs out of values.zipFunction
- public static <R> Stream<R> zip(long[] a, long[] b, LongBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(long[] a, long[] b, long[] c, LongTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(LongIterator a, LongIterator b, LongBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(LongIterator a, LongIterator b, LongIterator c, LongTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(LongStream a, LongStream b, LongBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(LongStream a, LongStream b, LongStream c, LongTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(java.util.Collection<? extends LongStream> c, LongNFunction<R> zipFunction)
c
- zipFunction
- public static <R> Stream<R> zip(long[] a, long[] b, long valueForNoneA, long valueForNoneB, LongBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(long[] a, long[] b, long[] c, long valueForNoneA, long valueForNoneB, long valueForNoneC, LongTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(LongIterator a, LongIterator b, long valueForNoneA, long valueForNoneB, LongBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(LongIterator a, LongIterator b, LongIterator c, long valueForNoneA, long valueForNoneB, long valueForNoneC, LongTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(LongStream a, LongStream b, long valueForNoneA, long valueForNoneB, LongBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(LongStream a, LongStream b, LongStream c, long valueForNoneA, long valueForNoneB, long valueForNoneC, LongTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(java.util.Collection<? extends LongStream> c, long[] valuesForNone, LongNFunction<R> zipFunction)
c
- valuesForNone
- value to fill for any iterator runs out of values.zipFunction
- public static <R> Stream<R> zip(float[] a, float[] b, FloatBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(float[] a, float[] b, float[] c, FloatTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(FloatIterator a, FloatIterator b, FloatBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(FloatIterator a, FloatIterator b, FloatIterator c, FloatTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(FloatStream a, FloatStream b, FloatBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(FloatStream a, FloatStream b, FloatStream c, FloatTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(java.util.Collection<? extends FloatStream> c, FloatNFunction<R> zipFunction)
c
- zipFunction
- public static <R> Stream<R> zip(float[] a, float[] b, float valueForNoneA, float valueForNoneB, FloatBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(float[] a, float[] b, float[] c, float valueForNoneA, float valueForNoneB, float valueForNoneC, FloatTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(FloatIterator a, FloatIterator b, float valueForNoneA, float valueForNoneB, FloatBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(FloatIterator a, FloatIterator b, FloatIterator c, float valueForNoneA, float valueForNoneB, float valueForNoneC, FloatTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(FloatStream a, FloatStream b, float valueForNoneA, float valueForNoneB, FloatBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(FloatStream a, FloatStream b, FloatStream c, float valueForNoneA, float valueForNoneB, float valueForNoneC, FloatTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(java.util.Collection<? extends FloatStream> c, float[] valuesForNone, FloatNFunction<R> zipFunction)
c
- valuesForNone
- value to fill for any iterator runs out of values.zipFunction
- public static <R> Stream<R> zip(double[] a, double[] b, DoubleBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(double[] a, double[] b, double[] c, DoubleTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(DoubleIterator a, DoubleIterator b, DoubleBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(DoubleIterator a, DoubleIterator b, DoubleIterator c, DoubleTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(DoubleStream a, DoubleStream b, DoubleBiFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(DoubleStream a, DoubleStream b, DoubleStream c, DoubleTriFunction<R> zipFunction)
a
- b
- public static <R> Stream<R> zip(java.util.Collection<? extends DoubleStream> c, DoubleNFunction<R> zipFunction)
c
- zipFunction
- public static <R> Stream<R> zip(double[] a, double[] b, double valueForNoneA, double valueForNoneB, DoubleBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(double[] a, double[] b, double[] c, double valueForNoneA, double valueForNoneB, double valueForNoneC, DoubleTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(DoubleIterator a, DoubleIterator b, double valueForNoneA, double valueForNoneB, DoubleBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(DoubleIterator a, DoubleIterator b, DoubleIterator c, double valueForNoneA, double valueForNoneB, double valueForNoneC, DoubleTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(DoubleStream a, DoubleStream b, double valueForNoneA, double valueForNoneB, DoubleBiFunction<R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <R> Stream<R> zip(DoubleStream a, DoubleStream b, DoubleStream c, double valueForNoneA, double valueForNoneB, double valueForNoneC, DoubleTriFunction<R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <R> Stream<R> zip(java.util.Collection<? extends DoubleStream> c, double[] valuesForNone, DoubleNFunction<R> zipFunction)
c
- valuesForNone
- value to fill for any iterator runs out of values.zipFunction
- public static <A,B,R> Stream<R> zip(A[] a, B[] b, BiFunction<? super A,? super B,R> zipFunction)
a
- b
- public static <A,B,C,R> Stream<R> zip(A[] a, B[] b, C[] c, TriFunction<? super A,? super B,? super C,R> zipFunction)
a
- b
- public static <A,B,R> Stream<R> zip(java.util.Collection<? extends A> a, java.util.Collection<? extends B> b, BiFunction<? super A,? super B,R> zipFunction)
a
- b
- public static <A,B,C,R> Stream<R> zip(java.util.Collection<? extends A> a, java.util.Collection<? extends B> b, java.util.Collection<? extends C> c, TriFunction<? super A,? super B,? super C,R> zipFunction)
a
- b
- public static <A,B,R> Stream<R> zip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, BiFunction<? super A,? super B,R> zipFunction)
a
- b
- public static <A,B,C,R> Stream<R> zip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, java.util.Iterator<? extends C> c, TriFunction<? super A,? super B,? super C,R> zipFunction)
a
- b
- public static <A,B,R> Stream<R> zip(Stream<? extends A> a, Stream<? extends B> b, BiFunction<? super A,? super B,R> zipFunction)
a
- b
- public static <A,B,C,R> Stream<R> zip(Stream<? extends A> a, Stream<? extends B> b, Stream<? extends C> c, TriFunction<? super A,? super B,? super C,R> zipFunction)
a
- b
- public static <T,R> Stream<R> zip(java.util.List<? extends java.util.Collection<? extends T>> c, Function<? super java.util.List<? extends T>,R> zipFunction)
public static <T,R> Stream<R> zip(java.util.Collection<? extends Stream<? extends T>> c, Function<? super java.util.List<? extends T>,R> zipFunction)
c
- zipFunction
- public static <T,R> Stream<R> zipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c, Function<? super java.util.List<? extends T>,R> zipFunction)
public static <A,B,R> Stream<R> zip(A[] a, B[] b, A valueForNoneA, B valueForNoneB, BiFunction<? super A,? super B,R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <A,B,C,R> Stream<R> zip(A[] a, B[] b, C[] c, A valueForNoneA, B valueForNoneB, C valueForNoneC, TriFunction<? super A,? super B,? super C,R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <A,B,R> Stream<R> zip(java.util.Collection<? extends A> a, java.util.Collection<? extends B> b, A valueForNoneA, B valueForNoneB, BiFunction<? super A,? super B,R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <A,B,C,R> Stream<R> zip(java.util.Collection<? extends A> a, java.util.Collection<? extends B> b, java.util.Collection<? extends C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, TriFunction<? super A,? super B,? super C,R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <A,B,R> Stream<R> zip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, A valueForNoneA, B valueForNoneB, BiFunction<? super A,? super B,R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <A,B,C,R> Stream<R> zip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, java.util.Iterator<? extends C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, TriFunction<? super A,? super B,? super C,R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <A,B,R> Stream<R> zip(Stream<? extends A> a, Stream<? extends B> b, A valueForNoneA, B valueForNoneB, BiFunction<? super A,? super B,R> zipFunction)
a
- b
- valueForNoneA
- value to fill if "a" runs out of values first.valueForNoneB
- value to fill if "b" runs out of values first.zipFunction
- public static <A,B,C,R> Stream<R> zip(Stream<? extends A> a, Stream<? extends B> b, Stream<? extends C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, TriFunction<? super A,? super B,? super C,R> zipFunction)
a
- b
- c
- valueForNoneA
- value to fill if "a" runs out of values.valueForNoneB
- value to fill if "b" runs out of values.valueForNoneC
- value to fill if "c" runs out of values.zipFunction
- public static <T,R> Stream<R> zip(java.util.List<? extends java.util.Collection<? extends T>> c, java.util.List<? extends T> valuesForNone, Function<? super java.util.List<? extends T>,R> zipFunction)
public static <T,R> Stream<R> zip(java.util.Collection<? extends Stream<? extends T>> c, java.util.List<? extends T> valuesForNone, Function<? super java.util.List<? extends T>,R> zipFunction)
c
- valuesForNone
- value to fill for any iterator runs out of values.zipFunction
- public static <T,R> Stream<R> zipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c, java.util.List<? extends T> valuesForNone, Function<? super java.util.List<? extends T>,R> zipFunction)
c
- valuesForNone
- value to fill for any iterator runs out of values.zipFunction
- public static <A,B,R> Stream<R> parallelZip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, BiFunction<? super A,? super B,R> zipFunction)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- zipFunction
- public static <A,B,R> Stream<R> parallelZip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, BiFunction<? super A,? super B,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <A,B,C,R> Stream<R> parallelZip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, java.util.Iterator<? extends C> c, TriFunction<? super A,? super B,? super C,R> zipFunction)
public static <A,B,C,R> Stream<R> parallelZip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, java.util.Iterator<? extends C> c, TriFunction<? super A,? super B,? super C,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- c
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <A,B,R> Stream<R> parallelZip(Stream<A> a, Stream<B> b, BiFunction<? super A,? super B,R> zipFunction)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- zipFunction
- public static <A,B,R> Stream<R> parallelZip(Stream<A> a, Stream<B> b, BiFunction<? super A,? super B,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <A,B,C,R> Stream<R> parallelZip(Stream<A> a, Stream<B> b, Stream<C> c, TriFunction<? super A,? super B,? super C,R> zipFunction)
public static <A,B,C,R> Stream<R> parallelZip(Stream<A> a, Stream<B> b, Stream<C> c, TriFunction<? super A,? super B,? super C,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- c
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <T,R> Stream<R> parallelZip(java.util.List<? extends java.util.Collection<? extends T>> c, Function<? super java.util.List<? extends T>,R> zipFunction)
public static <T,R> Stream<R> parallelZip(java.util.List<? extends java.util.Collection<? extends T>> c, Function<? super java.util.List<? extends T>,R> zipFunction, int queueSize)
public static <T,R> Stream<R> parallelZip(java.util.Collection<? extends Stream<? extends T>> c, Function<? super java.util.List<? extends T>,R> zipFunction)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
c
- zipFunction
- public static <T,R> Stream<R> parallelZip(java.util.Collection<? extends Stream<? extends T>> c, Function<? super java.util.List<? extends T>,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- c
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <T,R> Stream<R> parallelZipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c, Function<? super java.util.List<? extends T>,R> zipFunction)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
c
- zipFunction
- public static <T,R> Stream<R> parallelZipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c, Function<? super java.util.List<? extends T>,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- c
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <A,B,R> Stream<R> parallelZip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, A valueForNoneA, B valueForNoneB, BiFunction<? super A,? super B,R> zipFunction)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- valueForNoneA
- valueForNoneB
- zipFunction
- public static <A,B,R> Stream<R> parallelZip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, A valueForNoneA, B valueForNoneB, BiFunction<? super A,? super B,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- valueForNoneA
- valueForNoneB
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <A,B,C,R> Stream<R> parallelZip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, java.util.Iterator<? extends C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, TriFunction<? super A,? super B,? super C,R> zipFunction)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- c
- valueForNoneA
- valueForNoneB
- valueForNoneC
- zipFunction
- public static <A,B,C,R> Stream<R> parallelZip(java.util.Iterator<? extends A> a, java.util.Iterator<? extends B> b, java.util.Iterator<? extends C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, TriFunction<? super A,? super B,? super C,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- c
- valueForNoneA
- valueForNoneB
- valueForNoneC
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <A,B,R> Stream<R> parallelZip(Stream<A> a, Stream<B> b, A valueForNoneA, B valueForNoneB, BiFunction<? super A,? super B,R> zipFunction)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- valueForNoneA
- valueForNoneB
- zipFunction
- public static <A,B,R> Stream<R> parallelZip(Stream<A> a, Stream<B> b, A valueForNoneA, B valueForNoneB, BiFunction<? super A,? super B,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- valueForNoneA
- valueForNoneB
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <A,B,C,R> Stream<R> parallelZip(Stream<A> a, Stream<B> b, Stream<C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, TriFunction<? super A,? super B,? super C,R> zipFunction)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- c
- valueForNoneA
- valueForNoneB
- valueForNoneC
- zipFunction
- public static <A,B,C,R> Stream<R> parallelZip(Stream<A> a, Stream<B> b, Stream<C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC, TriFunction<? super A,? super B,? super C,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
a
- b
- c
- valueForNoneA
- valueForNoneB
- valueForNoneC
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <T,R> Stream<R> parallelZip(java.util.List<? extends java.util.Collection<? extends T>> c, java.util.List<? extends T> valuesForNone, Function<? super java.util.List<? extends T>,R> zipFunction)
public static <T,R> Stream<R> parallelZip(java.util.List<? extends java.util.Collection<? extends T>> c, java.util.List<? extends T> valuesForNone, Function<? super java.util.List<? extends T>,R> zipFunction, int queueSize)
public static <T,R> Stream<R> parallelZip(java.util.Collection<? extends Stream<? extends T>> c, java.util.List<? extends T> valuesForNone, Function<? super java.util.List<? extends T>,R> zipFunction)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
c
- valuesForNone
- zipFunction
- public static <T,R> Stream<R> parallelZip(java.util.Collection<? extends Stream<? extends T>> c, java.util.List<? extends T> valuesForNone, Function<? super java.util.List<? extends T>,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
c
- valuesForNone
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <T,R> Stream<R> parallelZipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c, java.util.List<? extends T> valuesForNone, Function<? super java.util.List<? extends T>,R> zipFunction)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
c
- valuesForNone
- zipFunction
- public static <T,R> Stream<R> parallelZipp(java.util.Collection<? extends java.util.Iterator<? extends T>> c, java.util.List<? extends T> valuesForNone, Function<? super java.util.List<? extends T>,R> zipFunction, int queueSize)
try (Stream stream = Stream.parallelZip(a, b, zipFunction)) {
stream.forEach(N::println);
}
c
- valuesForNone
- zipFunction
- queueSize
- for each iterator. Default value is 32public static <T> Stream<T> merge(T[] a, T[] b, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
a
- b
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.public static <T> Stream<T> merge(T[] a, T[] b, T[] c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
a
- b
- c
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.public static <T> Stream<T> merge(java.util.Collection<? extends T> a, java.util.Collection<? extends T> b, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
a
- b
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.public static <T> Stream<T> merge(java.util.Collection<? extends T> a, java.util.Collection<? extends T> b, java.util.Collection<? extends T> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
a
- b
- c
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.public static <T> Stream<T> merge(java.util.Iterator<? extends T> a, java.util.Iterator<? extends T> b, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
a
- b
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.public static <T> Stream<T> merge(java.util.Iterator<? extends T> a, java.util.Iterator<? extends T> b, java.util.Iterator<? extends T> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
a
- b
- c
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.public static <T> Stream<T> merge(Stream<? extends T> a, Stream<? extends T> b, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
a
- b
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.public static <T> Stream<T> merge(Stream<? extends T> a, Stream<? extends T> b, Stream<? extends T> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
public static <T> Stream<T> merge(java.util.List<? extends java.util.Collection<? extends T>> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
public static <T> Stream<T> merge(java.util.Collection<? extends Stream<? extends T>> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
c
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.public static <T> Stream<T> mergge(java.util.Collection<? extends java.util.Iterator<? extends T>> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
c
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.public static <T> Stream<T> parallelMerge(java.util.List<? extends java.util.Collection<? extends T>> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
public static <T> Stream<T> parallelMerge(java.util.List<? extends java.util.Collection<? extends T>> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector, int maxThreadNum)
public static <T> Stream<T> parallelMerge(java.util.Collection<? extends Stream<? extends T>> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
c
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.public static <T> Stream<T> parallelMerge(java.util.Collection<? extends Stream<? extends T>> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector, int maxThreadNum)
c
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.maxThreadNum
- public static <T> Stream<T> parallelMergge(java.util.Collection<? extends java.util.Iterator<? extends T>> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector)
c
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.public static <T> Stream<T> parallelMergge(java.util.Collection<? extends java.util.Iterator<? extends T>> c, BiFunction<? super T,? super T,com.landawn.abacus.util.Nth> nextSelector, int maxThreadNum)
c
- nextSelector
- first parameter is selected if Nth.FIRST
is returned, otherwise the second parameter is selected.maxThreadNum
- public S carry(C action)
BaseStream
peek
carry
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
BaseStream.peek(Object)
public S slice(long from, long to)
BaseStream
stream.skip(from).limit(to - from)
.slice
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
public Stream<S> sliding(int windowSize)
sliding
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
BaseStream.sliding(int, int)
public Stream<PL> slidingToList(int windowSize)
slidingToList
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
BaseStream.sliding(int, int)
public S shuffled()
BaseStream
shuffled
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
public ImmutableList<T> toImmutableList()
toImmutableList
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
public ImmutableSet<T> toImmutableSet()
toImmutableSet
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
public java.lang.String join(java.lang.CharSequence delimiter)
join
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
public void println()
println
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
public boolean isParallel()
isParallel
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
public S sequential()
sequential
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
public S parallel()
parallel
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
public S parallel(int maxThreadNum)
parallel
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
public S parallel(BaseStream.Splitor splitor)
parallel
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
public S parallel(java.util.concurrent.Executor exector)
parallel
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
exector
- should be able to execute sum of maxThreadNum
operations in parallel.public void close()
close
in interface BaseStream<T,A,P,C,PL,OT,IT,ITER,S extends com.landawn.abacus.util.stream.StreamBase<T,A,P,C,PL,OT,IT,ITER,S>>
close
in interface java.lang.AutoCloseable