| Package | Description |
|---|---|
| com.annimon.stream |
| Modifier and Type | Method and Description |
|---|---|
<K> Stream<List<T>> |
Stream.chunkBy(Function<? super T,? extends K> classifier)
Partitions
Stream into Lists according to the given classifier function. |
static <T> Stream<T> |
Stream.concat(Stream<? extends T> stream1,
Stream<? extends T> stream2)
Concatenates two streams.
|
Stream<T> |
Stream.distinct()
Returns
Stream with distinct elements (as determinated by equals method). |
Stream<T> |
Stream.dropWhile(Predicate<? super T> predicate)
Drops elements while the predicate is true and returns the rest.
|
static <T> Stream<T> |
Stream.empty()
Returns an empty stream.
|
Stream<T> |
Stream.filter(Predicate<? super T> predicate)
Returns
Stream with elements that satisfy the given predicate. |
Stream<T> |
Stream.filterNot(Predicate<? super T> predicate)
Returns
Stream with elements that does not satisfy the given predicate. |
<R> Stream<R> |
Stream.flatMap(Function<? super T,? extends Stream<? extends R>> mapper)
Generates
Stream by concatenating elements that obtained by applying the given function. |
static <T> Stream<T> |
Stream.generate(Supplier<T> supplier)
Creates a
Stream by elements that generated by Supplier. |
<K> Stream<Map.Entry<K,List<T>>> |
Stream.groupBy(Function<? super T,? extends K> classifier)
Partitions
Stream into Map entries according to the given classifier function. |
static <T> Stream<T> |
Stream.iterate(T seed,
UnaryOperator<T> op)
Creates a
Stream by applying UnaryOperator operation to an initial element seed. |
Stream<T> |
Stream.limit(long maxSize)
Returns
Stream with first maxSize elements. |
<R> Stream<R> |
Stream.map(Function<? super T,? extends R> mapper)
Returns
Stream with elements that obtained by applying the given function. |
static <T> Stream<T> |
Stream.of(Iterable<? extends T> iterable)
Creates a
Stream from any class that implements Iterable interface. |
static <T> Stream<T> |
Stream.of(Iterator<? extends T> iterator)
Creates a
Stream from any class that implements Iterator interface. |
static <T> Stream<T> |
Stream.of(List<? extends T> list)
Creates a
Stream from List. |
static <K,V> Stream<Map.Entry<K,V>> |
Stream.of(Map<K,V> map)
Creates a
Stream from Map entries. |
static <T> Stream<T> |
Stream.of(T... elements)
Creates a
Stream from the specified values. |
static Stream<Integer> |
Stream.ofRange(int from,
int to)
Deprecated.
As of release 1.0.7, replaced by
range(int, int) |
static Stream<Long> |
Stream.ofRange(long from,
long to)
Deprecated.
As of release 1.0.7, replaced by
range(long, long) |
static Stream<Integer> |
Stream.ofRangeClosed(int from,
int to)
Deprecated.
As of release 1.0.7, replaced by
rangeClosed(int, int) |
static Stream<Long> |
Stream.ofRangeClosed(long from,
long to)
Deprecated.
As of release 1.0.7, replaced by
rangeClosed(long, long) |
Stream<T> |
Stream.peek(Consumer<? super T> action)
Perform provided action to each elements.
|
static Stream<Integer> |
Stream.range(int from,
int to)
Creates a
Stream<Integer> from not closed range
(from from inclusive to to exclusive and incremental step 1). |
static Stream<Long> |
Stream.range(long from,
long to)
Creates a
Stream<Long> from not closed range
(from from inclusive to to exclusive and incremental step 1). |
static Stream<Integer> |
Stream.rangeClosed(int from,
int to)
Creates a
Stream<Integer> from closed range
(from from inclusive to to inclusive and incremental step 1). |
static Stream<Long> |
Stream.rangeClosed(long from,
long to)
Creates a
Stream<Long> from closed range
(from from inclusive to to inclusive and incremental step 1). |
Stream<T> |
Stream.sample(int stepWidth)
Samples the
Stream by emitting every n-th element. |
<TT> Stream<TT> |
Stream.select(Class<TT> clazz)
Returns a stream consisting of the elements of this stream which are
instances of given class.
|
Stream<T> |
Stream.skip(long n)
Skips first
n elements and returns Stream with remaining elements. |
Stream<List<T>> |
Stream.slidingWindow(int windowSize)
Partitions
Stream into Lists of fixed size by sliding over the elements of the stream. |
Stream<List<T>> |
Stream.slidingWindow(int windowSize,
int stepWidth)
Partitions
Stream into Lists of fixed size by sliding over the elements of the stream. |
<R extends Comparable<? super R>> |
Stream.sortBy(Function<? super T,? extends R> f)
Returns
Stream with sorted elements (as determinated by Comparable interface). |
Stream<T> |
Stream.sorted()
Returns
Stream with sorted elements (as determinated by Comparable interface). |
Stream<T> |
Stream.sorted(Comparator<? super T> comparator)
Returns
Stream with sorted elements (as determinated by provided Comparator). |
Stream<T> |
Stream.takeWhile(Predicate<? super T> predicate)
Takes elements while the predicate is true.
|
static <F,S,R> Stream<R> |
Stream.zip(Stream<? extends F> stream1,
Stream<? extends S> stream2,
BiFunction<? super F,? super S,? extends R> combiner)
Combines two streams by applying specified combiner function to each element at same position.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Stream<T> |
Stream.concat(Stream<? extends T> stream1,
Stream<? extends T> stream2)
Concatenates two streams.
|
static <T> Stream<T> |
Stream.concat(Stream<? extends T> stream1,
Stream<? extends T> stream2)
Concatenates two streams.
|
static <F,S,R> Stream<R> |
Stream.zip(Stream<? extends F> stream1,
Stream<? extends S> stream2,
BiFunction<? super F,? super S,? extends R> combiner)
Combines two streams by applying specified combiner function to each element at same position.
|
static <F,S,R> Stream<R> |
Stream.zip(Stream<? extends F> stream1,
Stream<? extends S> stream2,
BiFunction<? super F,? super S,? extends R> combiner)
Combines two streams by applying specified combiner function to each element at same position.
|
| Modifier and Type | Method and Description |
|---|---|
<R> R |
Stream.custom(Function<Stream<T>,R> function)
Applies custom operator on stream.
|
<R> Stream<R> |
Stream.flatMap(Function<? super T,? extends Stream<? extends R>> mapper)
Generates
Stream by concatenating elements that obtained by applying the given function. |
Copyright © 2016. All rights reserved.