| Package | Description |
|---|---|
| com.annimon.stream | |
| com.annimon.stream.function |
| Modifier and Type | Method and Description |
|---|---|
Function<A,R> |
Collector.finisher()
Function produces result by transforming intermediate type.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Collector<T,?,Double> |
Collectors.averaging(Function<? super T,Double> mapper)
Deprecated.
As of release 1.1.3, replaced by
Collectors.averagingDouble(com.annimon.stream.function.ToDoubleFunction) |
<K> Stream<List<T>> |
Stream.chunkBy(Function<? super T,? extends K> classifier)
Partitions
Stream into Lists according to the given classifier function. |
static <T,A,IR,OR> |
Collectors.collectingAndThen(Collector<T,A,IR> c,
Function<IR,OR> finisher)
Returns a
Collector that performs additional transformation. |
<R> R |
DoubleStream.custom(Function<DoubleStream,R> function)
Applies custom operator on stream.
|
<R> R |
IntStream.custom(Function<IntStream,R> function)
Applies custom operator on stream.
|
<R> R |
LongStream.custom(Function<LongStream,R> function)
Applies custom operator on stream.
|
<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)
Returns a stream consisting of the results of replacing each element of
this stream with the contents of a mapped stream produced by applying
the provided mapping function to each element.
|
<U> Optional<U> |
Optional.flatMap(Function<? super T,Optional<U>> mapper)
Invokes mapping function with
Optional result if value is present. |
static <T,U,A,R> Collector<T,?,R> |
Collectors.flatMapping(Function<? super T,? extends Stream<? extends U>> mapper,
Collector<? super U,A,R> downstream)
Returns a
Collector that performs flat-mapping before accumulation. |
DoubleStream |
Stream.flatMapToDouble(Function<? super T,? extends DoubleStream> mapper)
Returns a stream consisting of the results of replacing each element of
this stream with the contents of a mapped stream produced by applying
the provided mapping function to each element.
|
IntStream |
Stream.flatMapToInt(Function<? super T,? extends IntStream> mapper)
Returns a stream consisting of the results of replacing each element of
this stream with the contents of a mapped stream produced by applying
the provided mapping function to each element.
|
LongStream |
Stream.flatMapToLong(Function<? super T,? extends LongStream> mapper)
Returns a stream consisting of the results of replacing each element of
this stream with the contents of a mapped stream produced by applying
the provided mapping function to each element.
|
<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,K> Collector<T,?,Map<K,List<T>>> |
Collectors.groupingBy(Function<? super T,? extends K> classifier)
Returns a
Collector that performs grouping operation by given classifier. |
static <T,K,A,D> Collector<T,?,Map<K,D>> |
Collectors.groupingBy(Function<? super T,? extends K> classifier,
Collector<? super T,A,D> downstream)
Returns a
Collector that performs grouping operation by given classifier. |
static <T,K,D,A,M extends Map<K,D>> |
Collectors.groupingBy(Function<? super T,? extends K> classifier,
Supplier<M> mapFactory,
Collector<? super T,A,D> downstream)
Returns a
Collector that performs grouping operation by given classifier. |
<R> Stream<R> |
Stream.map(Function<? super T,? extends R> mapper)
Returns
Stream with elements that obtained by applying the given function. |
<U> Optional<U> |
Optional.map(Function<? super T,? extends U> mapper)
Invokes the given mapping function on inner value if present.
|
static <T,U,A,R> Collector<T,?,R> |
Collectors.mapping(Function<? super T,? extends U> mapper,
Collector<? super U,A,R> downstream)
Returns a
Collector that performs mapping before accumulation. |
Exceptional<T> |
Exceptional.recoverWith(Function<Throwable,? extends Exceptional<T>> function)
Returns current
Exceptional if there were no exceptions, otherwise
returns an Exceptional produced by function. |
static <T,R> Collector<T,?,R> |
Collectors.reducing(R identity,
Function<? super T,? extends R> mapper,
BinaryOperator<R> op)
Returns a
Collector that reduces input elements. |
<R extends Comparable<? super R>> |
Stream.sortBy(Function<? super T,? extends R> f)
Returns
Stream with sorted elements (as determinated by Comparable interface). |
static <T,K> Collector<T,?,Map<K,T>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper)
Returns a
Collector that fills new Map with input elements. |
static <T,K,V> Collector<T,?,Map<K,V>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper)
Returns a
Collector that fills new Map with input elements. |
static <T,K,V> Collector<T,?,Map<K,V>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper)
Returns a
Collector that fills new Map with input elements. |
static <T,K,V,M extends Map<K,V>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Supplier<M> mapFactory)
Returns a
Collector that fills new Map with input elements. |
static <T,K,V,M extends Map<K,V>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper,
Supplier<M> mapFactory)
Returns a
Collector that fills new Map with input elements. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
UnaryOperator<T>
Operation on a single operand that produces a result of the
same type as its operand.
|
| Modifier and Type | Method and Description |
|---|---|
static <T,R,V> Function<T,V> |
Function.Util.andThen(Function<? super T,? extends R> f1,
Function<? super R,? extends V> f2)
Composes
Function calls. |
static <V,T,R> Function<V,R> |
Function.Util.compose(Function<? super T,? extends R> f1,
Function<? super V,? extends T> f2)
Composes
Function calls. |
static <T,R> Function<T,R> |
Function.Util.safe(ThrowableFunction<? super T,? extends R,Throwable> throwableFunction)
Creates a safe
Function, |
static <T,R> Function<T,R> |
Function.Util.safe(ThrowableFunction<? super T,? extends R,Throwable> throwableFunction,
R resultIfFailed)
Creates a safe
Function, |
| Modifier and Type | Method and Description |
|---|---|
static <T,U,R,V> BiFunction<T,U,V> |
BiFunction.Util.andThen(BiFunction<? super T,? super U,? extends R> f1,
Function<? super R,? extends V> f2)
Composes
BiFunction calls. |
static <T,R,V> Function<T,V> |
Function.Util.andThen(Function<? super T,? extends R> f1,
Function<? super R,? extends V> f2)
Composes
Function calls. |
static <T,R,V> Function<T,V> |
Function.Util.andThen(Function<? super T,? extends R> f1,
Function<? super R,? extends V> f2)
Composes
Function calls. |
static <V,T,R> Function<V,R> |
Function.Util.compose(Function<? super T,? extends R> f1,
Function<? super V,? extends T> f2)
Composes
Function calls. |
static <V,T,R> Function<V,R> |
Function.Util.compose(Function<? super T,? extends R> f1,
Function<? super V,? extends T> f2)
Composes
Function calls. |
Copyright © 2017. All rights reserved.