Package | Description |
---|---|
com.hazelcast.jet.stream |
java.util.stream implementation using Hazelcast Jet
|
Modifier and Type | Method and Description |
---|---|
static <T> DistributedCollector<T,?,Double> |
DistributedCollectors.averagingDouble(DistributedToDoubleFunction<? super T> mapper)
Returns a
DistributedCollector that produces the arithmetic mean of a double-valued
function applied to the input elements. |
static <T> DistributedCollector<T,?,Double> |
DistributedCollectors.averagingInt(DistributedToIntFunction<? super T> mapper)
Returns a
DistributedCollector that produces the arithmetic mean of an integer-valued
function applied to the input elements. |
static <T> DistributedCollector<T,?,Double> |
DistributedCollectors.averagingLong(DistributedToLongFunction<? super T> mapper)
Returns a
DistributedCollector that produces the arithmetic mean of a long-valued
function applied to the input elements. |
static <T,A,R,RR> DistributedCollector<T,A,RR> |
DistributedCollectors.collectingAndThen(DistributedCollector<T,A,R> downstream,
DistributedFunction<R,RR> finisher)
Adapts a
DistributedCollector to perform an additional finishing
transformation. |
static <T> DistributedCollector<T,?,Long> |
DistributedCollectors.counting()
Returns a
DistributedCollector accepting elements of type T that
counts the number of input elements. |
static <T,K> DistributedCollector<T,?,Map<K,List<T>>> |
DistributedCollectors.groupingBy(DistributedFunction<? super T,? extends K> classifier)
Returns a
DistributedCollector implementing a "group by" operation on
input elements of type T , grouping elements according to a
classification function, and returning the results in a Map . |
static <T,K,A,D> DistributedCollector<T,?,Map<K,D>> |
DistributedCollectors.groupingBy(DistributedFunction<? super T,? extends K> classifier,
DistributedCollector<? super T,A,D> downstream)
Returns a
DistributedCollector implementing a cascaded "group by" operation
on input elements of type T , grouping elements according to a
classification function, and then performing a reduction operation on
the values associated with a given key using the specified downstream
DistributedCollector . |
static <T,K,D,A,M extends Map<K,D>> |
DistributedCollectors.groupingBy(DistributedFunction<? super T,? extends K> classifier,
DistributedSupplier<M> mapFactory,
DistributedCollector<? super T,A,D> downstream)
Returns a
DistributedCollector implementing a cascaded "group by" operation
on input elements of type T , grouping elements according to a
classification function, and then performing a reduction operation on
the values associated with a given key using the specified downstream
DistributedCollector . |
static DistributedCollector<CharSequence,?,String> |
DistributedCollectors.joining()
Returns a
DistributedCollector that concatenates the input elements into a
String , in encounter order. |
static DistributedCollector<CharSequence,?,String> |
DistributedCollectors.joining(CharSequence delimiter)
Returns a
DistributedCollector that concatenates the input elements,
separated by the specified delimiter, in encounter order. |
static DistributedCollector<CharSequence,?,String> |
DistributedCollectors.joining(CharSequence delimiter,
CharSequence prefix,
CharSequence suffix)
Returns a
DistributedCollector that concatenates the input elements,
separated by the specified delimiter, with the specified prefix and
suffix, in encounter order. |
static <T,U,A,R> DistributedCollector<T,?,R> |
DistributedCollectors.mapping(DistributedFunction<? super T,? extends U> mapper,
DistributedCollector<? super U,A,R> downstream)
Adapts a
DistributedCollector accepting elements of type U to one
accepting elements of type T by applying a mapping function to
each input element before accumulation. |
static <T> DistributedCollector<T,?,DistributedOptional<T>> |
DistributedCollectors.maxBy(DistributedComparator<? super T> comparator)
Returns a
DistributedCollector that produces the maximal element according
to a given DistributedComparator , described as an Optional<T> . |
static <T> DistributedCollector<T,?,DistributedOptional<T>> |
DistributedCollectors.minBy(DistributedComparator<? super T> comparator)
Returns a
DistributedCollector that produces the minimal element according
to a given DistributedComparator , described as an Optional<T> . |
static <T,A,R> DistributedCollector<T,A,R> |
DistributedCollector.of(DistributedSupplier<A> supplier,
DistributedBiConsumer<A,T> accumulator,
DistributedBinaryOperator<A> combiner,
DistributedFunction<A,R> finisher,
java.util.stream.Collector.Characteristics... characteristics)
Returns a new
DistributedCollector described by the given supplier ,
accumulator , combiner , and finisher functions. |
static <T,R> DistributedCollector<T,R,R> |
DistributedCollector.of(DistributedSupplier<R> supplier,
DistributedBiConsumer<R,T> accumulator,
DistributedBinaryOperator<R> combiner,
java.util.stream.Collector.Characteristics... characteristics)
Returns a new
DistributedCollector described by the given supplier ,
accumulator , and combiner functions. |
static <T> DistributedCollector<T,?,DistributedOptional<T>> |
DistributedCollectors.reducing(DistributedBinaryOperator<T> op)
Returns a
DistributedCollector which performs a reduction of its
input elements under a specified DistributedBinaryOperator . |
static <T> DistributedCollector<T,?,T> |
DistributedCollectors.reducing(T identity,
DistributedBinaryOperator<T> op)
Returns a
DistributedCollector which performs a reduction of its
input elements under a specified DistributedBinaryOperator using the
provided identity. |
static <T,U> DistributedCollector<T,?,U> |
DistributedCollectors.reducing(U identity,
DistributedFunction<? super T,? extends U> mapper,
DistributedBinaryOperator<U> op)
Returns a
DistributedCollector which performs a reduction of its
input elements under a specified mapping function and
DistributedBinaryOperator . |
static <T> DistributedCollector<T,?,DoubleSummaryStatistics> |
DistributedCollectors.summarizingDouble(DistributedToDoubleFunction<? super T> mapper)
Returns a
DistributedCollector which applies an double -producing
mapping function to each input element, and returns summary statistics
for the resulting values. |
static <T> DistributedCollector<T,?,IntSummaryStatistics> |
DistributedCollectors.summarizingInt(DistributedToIntFunction<? super T> mapper)
Returns a
DistributedCollector which applies an int -producing
mapping function to each input element, and returns summary statistics
for the resulting values. |
static <T> DistributedCollector<T,?,LongSummaryStatistics> |
DistributedCollectors.summarizingLong(DistributedToLongFunction<? super T> mapper)
Returns a
DistributedCollector which applies an long -producing
mapping function to each input element, and returns summary statistics
for the resulting values. |
static <T> DistributedCollector<T,?,Double> |
DistributedCollectors.summingDouble(DistributedToDoubleFunction<? super T> mapper)
Returns a
DistributedCollector that produces the sum of a double-valued
function applied to the input elements. |
static <T> DistributedCollector<T,?,Integer> |
DistributedCollectors.summingInt(DistributedToIntFunction<? super T> mapper)
Returns a
DistributedCollector that produces the sum of a integer-valued
function applied to the input elements. |
static <T> DistributedCollector<T,?,Long> |
DistributedCollectors.summingLong(DistributedToLongFunction<? super T> mapper)
Returns a
DistributedCollector that produces the sum of a long-valued
function applied to the input elements. |
static <T,C extends Collection<T>> |
DistributedCollectors.toCollection(DistributedSupplier<C> collectionFactory)
Returns a
DistributedCollector that accumulates the input
elements into a new Collection , in encounter order. |
static <T> DistributedCollector<T,?,List<T>> |
DistributedCollectors.toList()
Returns a
DistributedCollector that accumulates the input
elements into a new List . |
static <T,K,U> DistributedCollector<T,?,Map<K,U>> |
DistributedCollectors.toMap(DistributedFunction<? super T,? extends K> keyMapper,
DistributedFunction<? super T,? extends U> valueMapper)
Returns a
DistributedCollector that accumulates elements into a
Map whose keys and values are the result of applying the provided
mapping functions to the input elements. |
static <T,K,U,M extends Map<K,U>> |
DistributedCollectors.toMap(DistributedFunction<? super T,? extends K> keyMapper,
DistributedFunction<? super T,? extends U> valueMapper,
DistributedBinaryOperator<U> mergeFunction,
DistributedSupplier<M> mapSupplier)
Returns a
DistributedCollector that accumulates elements into a
Map whose keys and values are the result of applying the provided
mapping functions to the input elements. |
static <T> DistributedCollector<T,?,Set<T>> |
DistributedCollectors.toSet()
Returns a
DistributedCollector that accumulates the input
elements into a new Set . |
Modifier and Type | Method and Description |
---|---|
default <R,A> R |
DistributedStream.collect(DistributedCollector<? super T,A,R> collector)
Performs a mutable
reduction operation on the elements of this stream using a
DistributedCollector . |
static <T,A,R,RR> DistributedCollector<T,A,RR> |
DistributedCollectors.collectingAndThen(DistributedCollector<T,A,R> downstream,
DistributedFunction<R,RR> finisher)
Adapts a
DistributedCollector to perform an additional finishing
transformation. |
static <T,K,A,D> DistributedCollector<T,?,Map<K,D>> |
DistributedCollectors.groupingBy(DistributedFunction<? super T,? extends K> classifier,
DistributedCollector<? super T,A,D> downstream)
Returns a
DistributedCollector implementing a cascaded "group by" operation
on input elements of type T , grouping elements according to a
classification function, and then performing a reduction operation on
the values associated with a given key using the specified downstream
DistributedCollector . |
static <T,K,D,A,M extends Map<K,D>> |
DistributedCollectors.groupingBy(DistributedFunction<? super T,? extends K> classifier,
DistributedSupplier<M> mapFactory,
DistributedCollector<? super T,A,D> downstream)
Returns a
DistributedCollector implementing a cascaded "group by" operation
on input elements of type T , grouping elements according to a
classification function, and then performing a reduction operation on
the values associated with a given key using the specified downstream
DistributedCollector . |
static <T,K,A,D> DistributedCollector.Reducer<T,com.hazelcast.cache.ICache<K,D>> |
DistributedCollectors.groupingByToICache(String cacheName,
DistributedFunction<? super T,? extends K> classifier,
DistributedCollector<? super T,A,D> downstream)
Returns a
Reducer implementing a cascaded "group by" operation
on input elements of type T , grouping elements according to a
classification function, and then performing a reduction operation on
the values associated with a given key using the specified downstream
DistributedCollector . |
static <T,K,A,D> DistributedCollector.Reducer<T,com.hazelcast.core.IMap<K,D>> |
DistributedCollectors.groupingByToIMap(String mapName,
DistributedFunction<? super T,? extends K> classifier,
DistributedCollector<? super T,A,D> downstream)
Returns a
Reducer implementing a cascaded "group by" operation
on input elements of type T , grouping elements according to a
classification function, and then performing a reduction operation on
the values associated with a given key using the specified downstream
DistributedCollector . |
static <T,U,A,R> DistributedCollector<T,?,R> |
DistributedCollectors.mapping(DistributedFunction<? super T,? extends U> mapper,
DistributedCollector<? super U,A,R> downstream)
Adapts a
DistributedCollector accepting elements of type U to one
accepting elements of type T by applying a mapping function to
each input element before accumulation. |
static <T,D,A> java.util.stream.Collector<T,?,Map<Boolean,D>> |
DistributedCollectors.partitioningBy(DistributedPredicate<? super T> predicate,
DistributedCollector<? super T,A,D> downstream)
Returns a
DistributedCollector which partitions the input elements according
to a DistributedPredicate , reduces the values in each partition according to
another DistributedCollector , and organizes them into a
Map<Boolean, D> whose values are the result of the downstream
reduction. |
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.