Package com.google.common.collect
Class CollectCollectors
java.lang.Object
com.google.common.collect.CollectCollectors
Collectors utilities for
common.collect
internals.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
CollectCollectors.EnumMapAccumulator<K extends Enum<K>,
V> private static final class
CollectCollectors.EnumSetAccumulator<E extends Enum<E>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Collector
<Object, ?, ImmutableList<Object>> private static final Collector
<Range<Comparable<?>>, ?, ImmutableRangeSet<Comparable<?>>> private static final Collector
<Object, ?, ImmutableSet<Object>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <T,
K, V> Collector <T, ?, ImmutableListMultimap<K, V>> flatteningToImmutableListMultimap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valuesFunction) (package private) static <T,
K, V> Collector <T, ?, ImmutableSetMultimap<K, V>> flatteningToImmutableSetMultimap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valuesFunction) flatteningToMultimap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valueFunction, Supplier<M> multimapSupplier) (package private) static <T,
K, V> Collector <T, ?, ImmutableBiMap<K, V>> toImmutableBiMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) (package private) static <T,
K extends Enum<K>, V>
Collector<T, ?, ImmutableMap<K, V>> toImmutableEnumMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) (package private) static <T,
K extends Enum<K>, V>
Collector<T, ?, ImmutableMap<K, V>> toImmutableEnumMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) (package private) static <E extends Enum<E>>
Collector<E, ?, ImmutableSet<E>> private static <E extends Enum<E>>
Collector<E, CollectCollectors.EnumSetAccumulator<E>, ImmutableSet<E>> (package private) static <E> Collector
<E, ?, ImmutableList<E>> (package private) static <T,
K, V> Collector <T, ?, ImmutableListMultimap<K, V>> toImmutableListMultimap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) (package private) static <T,
K, V> Collector <T, ?, ImmutableMap<K, V>> toImmutableMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) (package private) static <T,
K, V> Collector <T, ?, ImmutableMap<K, V>> toImmutableMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) (package private) static <T,
E> Collector <T, ?, ImmutableMultiset<E>> toImmutableMultiset
(Function<? super T, ? extends E> elementFunction, ToIntFunction<? super T> countFunction) (package private) static <T,
K extends Comparable<? super K>, V>
Collector<T, ?, ImmutableRangeMap<K, V>> toImmutableRangeMap
(Function<? super T, Range<K>> keyFunction, Function<? super T, ? extends V> valueFunction) (package private) static <E extends Comparable<? super E>>
Collector<Range<E>, ?, ImmutableRangeSet<E>> (package private) static <E> Collector
<E, ?, ImmutableSet<E>> (package private) static <T,
K, V> Collector <T, ?, ImmutableSetMultimap<K, V>> toImmutableSetMultimap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) (package private) static <T,
K, V> Collector <T, ?, ImmutableSortedMap<K, V>> toImmutableSortedMap
(Comparator<? super K> comparator, Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) (package private) static <T,
K, V> Collector <T, ?, ImmutableSortedMap<K, V>> toImmutableSortedMap
(Comparator<? super K> comparator, Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) (package private) static <E> Collector
<E, ?, ImmutableSortedSet<E>> toImmutableSortedSet
(Comparator<? super E> comparator) toMultimap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, Supplier<M> multimapSupplier) toMultiset
(Function<? super T, E> elementFunction, ToIntFunction<? super T> countFunction, Supplier<M> multisetSupplier)
-
Field Details
-
TO_IMMUTABLE_LIST
-
TO_IMMUTABLE_SET
-
TO_IMMUTABLE_RANGE_SET
private static final Collector<Range<Comparable<?>>,?, TO_IMMUTABLE_RANGE_SETImmutableRangeSet<Comparable<?>>>
-
-
Constructor Details
-
CollectCollectors
private CollectCollectors()
-
-
Method Details
-
toImmutableList
-
toImmutableSet
-
toImmutableSortedSet
static <E> Collector<E,?, toImmutableSortedSetImmutableSortedSet<E>> (Comparator<? super E> comparator) -
toImmutableEnumSet
-
toImmutableEnumSetGeneric
private static <E extends Enum<E>> Collector<E,CollectCollectors.EnumSetAccumulator<E>, toImmutableEnumSetGeneric()ImmutableSet<E>> -
toImmutableRangeSet
static <E extends Comparable<? super E>> Collector<Range<E>,?, toImmutableRangeSet()ImmutableRangeSet<E>> -
toImmutableMultiset
static <T,E> Collector<T,?, toImmutableMultisetImmutableMultiset<E>> (Function<? super T, ? extends E> elementFunction, ToIntFunction<? super T> countFunction) -
toMultiset
static <T,E, Collector<T,M extends Multiset<E>> ?, toMultisetM> (Function<? super T, E> elementFunction, ToIntFunction<? super T> countFunction, Supplier<M> multisetSupplier) -
toImmutableMap
static <T,K, Collector<T,V> ?, toImmutableMapImmutableMap<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) -
toImmutableMap
static <T,K, Collector<T,V> ?, toImmutableMapImmutableMap<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) -
toImmutableSortedMap
static <T,K, Collector<T,V> ?, toImmutableSortedMapImmutableSortedMap<K, V>> (Comparator<? super K> comparator, Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) -
toImmutableSortedMap
static <T,K, Collector<T,V> ?, toImmutableSortedMapImmutableSortedMap<K, V>> (Comparator<? super K> comparator, Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) -
toImmutableBiMap
static <T,K, Collector<T,V> ?, toImmutableBiMapImmutableBiMap<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) -
toImmutableEnumMap
static <T,K extends Enum<K>, Collector<T,V> ?, toImmutableEnumMapImmutableMap<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) -
toImmutableEnumMap
static <T,K extends Enum<K>, Collector<T,V> ?, toImmutableEnumMapImmutableMap<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) -
toImmutableRangeMap
static <T,K extends Comparable<? super K>, Collector<T,V> ?, toImmutableRangeMapImmutableRangeMap<K, V>> (Function<? super T, Range<K>> keyFunction, Function<? super T, ? extends V> valueFunction) -
toImmutableListMultimap
static <T,K, Collector<T,V> ?, toImmutableListMultimapImmutableListMultimap<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) -
flatteningToImmutableListMultimap
static <T,K, Collector<T,V> ?, flatteningToImmutableListMultimapImmutableListMultimap<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valuesFunction) -
toImmutableSetMultimap
static <T,K, Collector<T,V> ?, toImmutableSetMultimapImmutableSetMultimap<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) -
flatteningToImmutableSetMultimap
static <T,K, Collector<T,V> ?, flatteningToImmutableSetMultimapImmutableSetMultimap<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valuesFunction) -
toMultimap
-
flatteningToMultimap
-