| Package | Description |
|---|---|
| com.annimon.stream |
| 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) |
static <T> Collector<T,?,Double> |
Collectors.averagingDouble(ToDoubleFunction<? super T> mapper)
Returns a
Collector that calculates average of double-valued input elements. |
static <T> Collector<T,?,Double> |
Collectors.averagingInt(ToIntFunction<? super T> mapper)
Returns a
Collector that calculates average of integer-valued input elements. |
static <T> Collector<T,?,Double> |
Collectors.averagingLong(ToLongFunction<? super T> mapper)
Returns a
Collector that calculates average of long-valued 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,A,R> Collector<T,?,R> |
Collectors.filtering(Predicate<? super T> predicate,
Collector<? super T,A,R> downstream)
Returns a
Collector that filters input elements. |
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. |
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 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 input elements. |
static <T> Collector<T,?,T> |
Collectors.reducing(T identity,
BinaryOperator<T> op)
Returns a
Collector that reduces input elements. |
static <T> Collector<T,?,Double> |
Collectors.summingDouble(ToDoubleFunction<? super T> mapper)
Returns a
Collector that summing double-valued input elements. |
static <T> Collector<T,?,Integer> |
Collectors.summingInt(ToIntFunction<? super T> mapper)
Returns a
Collector that summing integer-valued input elements. |
static <T> Collector<T,?,Long> |
Collectors.summingLong(ToLongFunction<? super T> mapper)
Returns a
Collector that summing long-valued 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> 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,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> 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,A,R> Collector<T,?,R> |
Collectors.filtering(Predicate<? super T> predicate,
Collector<? super T,A,R> downstream)
Returns a
Collector that filters input elements. |
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. |
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 before accumulation. |
Copyright © 2017. All rights reserved.