| Package | Description |
|---|---|
| com.annimon.stream |
| Modifier and Type | Method and Description |
|---|---|
static <T> Collector<T,?,Double> |
Collectors.averaging(Function<? super T,Double> mapper)
Returns a
Collector that calculates average of input elements. |
static <T,A,IR,OR> |
Collectors.collectingAndThen(Collector<T,A,IR> c,
Function<IR,OR> finisher)
Returns a
Collector that performs additional transformation. |
static <T> Collector<T,?,Long> |
Collectors.counting()
Returns a
Collector that counts the number of input elements. |
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. |
static Collector<CharSequence,?,String> |
Collectors.joining()
Returns a
Collector that concatenates input elements into new string. |
static Collector<CharSequence,?,String> |
Collectors.joining(CharSequence delimiter)
Returns a
Collector that concatenates input elements into new string. |
static Collector<CharSequence,?,String> |
Collectors.joining(CharSequence delimiter,
CharSequence prefix,
CharSequence suffix)
Returns a
Collector that concatenates input elements into new string. |
static Collector<CharSequence,?,String> |
Collectors.joining(CharSequence delimiter,
CharSequence prefix,
CharSequence suffix,
String emptyValue)
Returns a
Collector that concatenates input elements into new string. |
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 function before accumulation. |
static <T,R> Collector<T,?,R> |
Collectors.reducing(R identity,
Function<? super T,? extends R> mapper,
BinaryOperator<R> op)
Returns a
Collector that reduces the input elements. |
static <T> Collector<T,?,T> |
Collectors.reducing(T identity,
BinaryOperator<T> op)
Returns a
Collector that reduces the input elements. |
static <T,R extends Collection<T>> |
Collectors.toCollection(Supplier<R> collectionSupplier)
Returns a
Collector that fills new Collection, provided by collectionSupplier, with input elements. |
static <T> Collector<T,?,List<T>> |
Collectors.toList()
Returns a
Collector that fills new List 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 List with input elements. |
static <T> Collector<T,?,Set<T>> |
Collectors.toSet()
Returns a
Collector that fills new Set with input elements. |
| Modifier and Type | Method and Description |
|---|---|
<R,A> R |
Stream.collect(Collector<? super T,A,R> collector)
Collects elements with
collector that encapsulates supplier, accumulator and combiner functions. |
static <T,A,IR,OR> |
Collectors.collectingAndThen(Collector<T,A,IR> c,
Function<IR,OR> finisher)
Returns a
Collector that performs additional transformation. |
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. |
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 function before accumulation. |
Copyright © 2016. All rights reserved.