- java.lang.Object
-
- pl.tlinkowski.unij.api.UniCollectors
-
public final class UniCollectors extends Object
Provides someCollectorfactory methods present inCollectorsclass.- Author:
- Tomasz Linkowski
-
-
Method Summary
Modifier and Type Method Description static <T,A,R>
Collector<T,?,R>filtering(Predicate<? super T> predicate, Collector<? super T,A,R> downstream)Equivalent ofCollectors.filtering(Predicate, Collector).static <T,U,A,R>
Collector<T,?,R>flatMapping(Function<? super T,? extends Stream<? extends U>> mapper, Collector<? super U,A,R> downstream)Equivalent ofCollectors.flatMapping(Function, Collector).static <T> Collector<T,?,List<T>>toUnmodifiableList()Equivalent ofCollectors.toUnmodifiableList().static <T,K,V>
Collector<T,?,Map<K,V>>toUnmodifiableMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)Equivalent ofCollectors.toUnmodifiableMap(Function, Function).static <T,K,V>
Collector<T,?,Map<K,V>>toUnmodifiableMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, BinaryOperator<V> mergeFunction)static <T> Collector<T,?,Set<T>>toUnmodifiableSet()Equivalent ofCollectors.toUnmodifiableSet().
-
-
-
Method Detail
-
toUnmodifiableList
public static <T> Collector<T,?,List<T>> toUnmodifiableList()
Equivalent ofCollectors.toUnmodifiableList().
-
toUnmodifiableSet
public static <T> Collector<T,?,Set<T>> toUnmodifiableSet()
Equivalent ofCollectors.toUnmodifiableSet().
-
toUnmodifiableMap
public static <T,K,V> Collector<T,?,Map<K,V>> toUnmodifiableMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
Equivalent ofCollectors.toUnmodifiableMap(Function, Function).
-
toUnmodifiableMap
public static <T,K,V> Collector<T,?,Map<K,V>> toUnmodifiableMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper, BinaryOperator<V> mergeFunction)
-
flatMapping
public static <T,U,A,R> Collector<T,?,R> flatMapping(Function<? super T,? extends Stream<? extends U>> mapper, Collector<? super U,A,R> downstream)
Equivalent ofCollectors.flatMapping(Function, Collector).
-
filtering
public static <T,A,R> Collector<T,?,R> filtering(Predicate<? super T> predicate, Collector<? super T,A,R> downstream)
Equivalent ofCollectors.filtering(Predicate, Collector).
-
-