Package it.bancaditalia.oss.vtl.util
Class SerCollectors
- java.lang.Object
-
- it.bancaditalia.oss.vtl.util.SerCollectors
-
public class SerCollectors extends Object
-
-
Constructor Summary
Constructors Constructor Description SerCollectors()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> SerCollector<T,double[],Double>
averagingDouble(SerToDoubleFunction<? super T> mapper)
static <T,A,R,RR>
SerCollector<T,A,RR>collectingAndThen(SerCollector<T,A,R> downstream, SerFunction<R,RR> finisher)
static <T> SerCollector<T,Long[],Long>
counting()
static <T,A,R>
SerCollector<T,A,R>filtering(SerPredicate<? super T> predicate, SerCollector<? super T,A,R> downstream)
static <T,K>
SerCollector<T,?,ConcurrentMap<K,List<T>>>groupingByConcurrent(SerFunction<? super T,? extends K> classifier)
static <T,K,A,D>
SerCollector<T,?,ConcurrentMap<K,D>>groupingByConcurrent(SerFunction<? super T,? extends K> classifier, SerCollector<? super T,A,D> downstream)
static <T,K,A,D,M extends ConcurrentMap<K,D>>
SerCollector<T,?,M>groupingByConcurrent(SerFunction<? super T,? extends K> classifier, SerSupplier<M> mapFactory, SerCollector<? super T,A,D> downstream)
static <T,U,A,R>
SerCollector<T,A,R>mapping(SerFunction<? super T,? extends U> mapper, SerCollector<? super U,A,R> downstream)
static <T extends Serializable>
SerCollector<T,?,Optional<T>>maxBy(Comparator<? super T> comparator)
static <T extends Serializable>
SerCollector<T,? extends SerConsumer<T>,Optional<T>>minBy(Comparator<? super T> comparator)
static <T,A,R>
SerCollector<T,A,R>peeking(SerConsumer<? super T> action, SerCollector<? super T,A,R> downstream)
static <T extends Serializable>
SerCollector<T,? extends SerConsumer<T>,Optional<T>>reducing(SerBinaryOperator<T> op)
static <T,U>
SerCollector<T,U[],U>reducing(U identity, SerFunction<? super T,? extends U> mapper, SerBinaryOperator<U> op)
static <T> SerCollector<T,double[],Double>
summingDouble(SerToDoubleFunction<? super T> mapper)
static <T> SerCollector<T,long[],Long>
summingLong(SerToLongFunction<? super T> mapper)
static <T,C extends Collection<T>>
SerCollector<T,C,C>toCollection(SerSupplier<C> collectionFactory)
static <T,K,U>
SerCollector<T,ConcurrentMap<K,U>,ConcurrentMap<K,U>>toConcurrentMap(SerFunction<? super T,? extends K> keyMapper, SerFunction<? super T,? extends U> valueMapper)
static <T,K,U>
SerCollector<T,ConcurrentMap<K,U>,ConcurrentMap<K,U>>toConcurrentMap(SerFunction<? super T,? extends K> keyMapper, SerFunction<? super T,? extends U> valueMapper, SerBinaryOperator<U> mergeFunction)
static <T,K,U,M extends ConcurrentMap<K,U>>
SerCollector<T,M,M>toConcurrentMap(SerFunction<? super T,? extends K> keyMapper, SerFunction<? super T,? extends U> valueMapper, SerBinaryOperator<U> mergeFunction, SerSupplier<M> mapSupplier)
static <T> SerCollector<T,List<T>,List<T>>
toList()
static <T> SerCollector<T,Set<T>,Set<T>>
toSet()
-
-
-
Method Detail
-
toConcurrentMap
public static <T,K,U> SerCollector<T,ConcurrentMap<K,U>,ConcurrentMap<K,U>> toConcurrentMap(SerFunction<? super T,? extends K> keyMapper, SerFunction<? super T,? extends U> valueMapper)
-
toConcurrentMap
public static <T,K,U> SerCollector<T,ConcurrentMap<K,U>,ConcurrentMap<K,U>> toConcurrentMap(SerFunction<? super T,? extends K> keyMapper, SerFunction<? super T,? extends U> valueMapper, SerBinaryOperator<U> mergeFunction)
-
toConcurrentMap
public static <T,K,U,M extends ConcurrentMap<K,U>> SerCollector<T,M,M> toConcurrentMap(SerFunction<? super T,? extends K> keyMapper, SerFunction<? super T,? extends U> valueMapper, SerBinaryOperator<U> mergeFunction, SerSupplier<M> mapSupplier)
-
collectingAndThen
public static <T,A,R,RR> SerCollector<T,A,RR> collectingAndThen(SerCollector<T,A,R> downstream, SerFunction<R,RR> finisher)
-
toSet
public static <T> SerCollector<T,Set<T>,Set<T>> toSet()
-
toCollection
public static <T,C extends Collection<T>> SerCollector<T,C,C> toCollection(SerSupplier<C> collectionFactory)
-
counting
public static <T> SerCollector<T,Long[],Long> counting()
-
reducing
public static <T,U> SerCollector<T,U[],U> reducing(U identity, SerFunction<? super T,? extends U> mapper, SerBinaryOperator<U> op)
-
mapping
public static <T,U,A,R> SerCollector<T,A,R> mapping(SerFunction<? super T,? extends U> mapper, SerCollector<? super U,A,R> downstream)
-
summingDouble
public static <T> SerCollector<T,double[],Double> summingDouble(SerToDoubleFunction<? super T> mapper)
-
summingLong
public static <T> SerCollector<T,long[],Long> summingLong(SerToLongFunction<? super T> mapper)
-
averagingDouble
public static <T> SerCollector<T,double[],Double> averagingDouble(SerToDoubleFunction<? super T> mapper)
-
toList
public static <T> SerCollector<T,List<T>,List<T>> toList()
-
filtering
public static <T,A,R> SerCollector<T,A,R> filtering(SerPredicate<? super T> predicate, SerCollector<? super T,A,R> downstream)
-
peeking
public static <T,A,R> SerCollector<T,A,R> peeking(SerConsumer<? super T> action, SerCollector<? super T,A,R> downstream)
-
minBy
public static <T extends Serializable> SerCollector<T,? extends SerConsumer<T>,Optional<T>> minBy(Comparator<? super T> comparator)
-
maxBy
public static <T extends Serializable> SerCollector<T,?,Optional<T>> maxBy(Comparator<? super T> comparator)
-
groupingByConcurrent
public static <T,K> SerCollector<T,?,ConcurrentMap<K,List<T>>> groupingByConcurrent(SerFunction<? super T,? extends K> classifier)
-
groupingByConcurrent
public static <T,K,A,D> SerCollector<T,?,ConcurrentMap<K,D>> groupingByConcurrent(SerFunction<? super T,? extends K> classifier, SerCollector<? super T,A,D> downstream)
-
groupingByConcurrent
public static <T,K,A,D,M extends ConcurrentMap<K,D>> SerCollector<T,?,M> groupingByConcurrent(SerFunction<? super T,? extends K> classifier, SerSupplier<M> mapFactory, SerCollector<? super T,A,D> downstream)
-
reducing
public static <T extends Serializable> SerCollector<T,? extends SerConsumer<T>,Optional<T>> reducing(SerBinaryOperator<T> op)
-
-