Top Description Inners Fields Constructors Methods
com.google.common.collect

pack-priv final Class CollectCollectors

extends Object
Class Inheritance
Annotations
@GwtCompatible
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.base.Preconditions.checkNotNull, java.util.Collections.singletonMap, java.util.stream.Collectors.collectingAndThen

Collectors utilities for common.collect internals.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final Collector<Object, ?, ImmutableList<Object>>
private static final Collector<Range<Comparable<?>>, ?, ImmutableRangeSet<Comparable<?>>>
private static final Collector<Object, ?, ImmutableSet<Object>>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableListMultimap<K, V>>
flatteningToImmutableListMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valuesFunction)

pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableSetMultimap<K, V>>
flatteningToImmutableSetMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valuesFunction)

pack-priv static <T extends @Nullable Object, K extends @Nullable Object, V extends @Nullable Object, M extends Multimap<K, V>> Collector<T, ?, M>
flatteningToMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valueFunction, Supplier<M> multimapSupplier)

pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableBiMap<K, V>>
toImmutableBiMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)

pack-priv static <T extends @Nullable Object, K extends Enum<K>, V> Collector<T, ?, ImmutableMap<K, V>>
toImmutableEnumMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)

pack-priv static <T extends @Nullable Object, 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)

pack-priv static <E extends Enum<E>> Collector<E, ?, ImmutableSet<E>>
private static <E extends Enum<E>> Collector<E, CollectCollectors.EnumSetAccumulator<E>, ImmutableSet<E>>
pack-priv static <E> Collector<E, ?, ImmutableList<E>>
pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableListMultimap<K, V>>
toImmutableListMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)

pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableMap<K, V>>
toImmutableMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)

public static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableMap<K, V>>
toImmutableMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction)

pack-priv static <T extends @Nullable Object, E> Collector<T, ?, ImmutableMultiset<E>>
toImmutableMultiset(Function<? super T, ? extends E> elementFunction, ToIntFunction<? super T> countFunction)

pack-priv static <T extends @Nullable Object, K extends Comparable<? super K>, V> Collector<T, ?, ImmutableRangeMap<K, V>>
toImmutableRangeMap(Function<? super T, Range<K>> keyFunction, Function<? super T, ? extends V> valueFunction)

pack-priv static <E extends Comparable<? super E>> Collector<Range<E>, ?, ImmutableRangeSet<E>>
pack-priv static <E> Collector<E, ?, ImmutableSet<E>>
pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableSetMultimap<K, V>>
toImmutableSetMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)

pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableSortedMap<K, V>>
toImmutableSortedMap(Comparator<? super K> comparator, Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)

pack-priv static <T extends @Nullable Object, 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)

pack-priv static <E> Collector<E, ?, ImmutableSortedSet<E>>
toImmutableSortedSet(Comparator<? super E> comparator)

pack-priv static <T extends @Nullable Object, K extends @Nullable Object, V extends @Nullable Object, M extends Multimap<K, V>> Collector<T, ?, M>
toMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, Supplier<M> multimapSupplier)

pack-priv static <T extends @Nullable Object, E extends @Nullable Object, M extends Multiset<E>> Collector<T, ?, M>
toMultiset(Function<? super T, E> elementFunction, ToIntFunction<? super T> countFunction, Supplier<M> multisetSupplier)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

TO_IMMUTABLE_LISTback to summary
private static final Collector<Object, ?, ImmutableList<Object>> TO_IMMUTABLE_LIST
TO_IMMUTABLE_RANGE_SETback to summary
private static final Collector<Range<Comparable<?>>, ?, ImmutableRangeSet<Comparable<?>>> TO_IMMUTABLE_RANGE_SET
Annotations
@GwtIncompatible
TO_IMMUTABLE_SETback to summary
private static final Collector<Object, ?, ImmutableSet<Object>> TO_IMMUTABLE_SET

Constructor Detail

CollectCollectorsback to summary
pack-priv CollectCollectors()

Method Detail

flatteningToImmutableListMultimapback to summary
pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableListMultimap<K, V>> flatteningToImmutableListMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valuesFunction)
flatteningToImmutableSetMultimapback to summary
pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableSetMultimap<K, V>> flatteningToImmutableSetMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valuesFunction)
flatteningToMultimapback to summary
pack-priv static <T extends @Nullable Object, K extends @Nullable Object, V extends @Nullable Object, M extends Multimap<K, V>> Collector<T, ?, M> flatteningToMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valueFunction, Supplier<M> multimapSupplier)
toImmutableBiMapback to summary
pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableBiMap<K, V>> toImmutableBiMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)
toImmutableEnumMapback to summary
pack-priv static <T extends @Nullable Object, K extends Enum<K>, V> Collector<T, ?, ImmutableMap<K, V>> toImmutableEnumMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)
Annotations
@J2ktIncompatible
toImmutableEnumMapback to summary
pack-priv static <T extends @Nullable Object, 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)
Annotations
@J2ktIncompatible
toImmutableEnumSetback to summary
pack-priv static <E extends Enum<E>> Collector<E, ?, ImmutableSet<E>> toImmutableEnumSet()
Annotations
@SuppressWarnings:rawtypes, unchecked
toImmutableEnumSetGenericback to summary
private static <E extends Enum<E>> Collector<E, CollectCollectors.EnumSetAccumulator<E>, ImmutableSet<E>> toImmutableEnumSetGeneric()
toImmutableListback to summary
pack-priv static <E> Collector<E, ?, ImmutableList<E>> toImmutableList()
Annotations
@SuppressWarnings:rawtypes, unchecked
toImmutableListMultimapback to summary
pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableListMultimap<K, V>> toImmutableListMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)
toImmutableMapback to summary
pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableMap<K, V>> toImmutableMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)
toImmutableMapback to summary
public static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableMap<K, V>> toImmutableMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction)
toImmutableMultisetback to summary
pack-priv static <T extends @Nullable Object, E> Collector<T, ?, ImmutableMultiset<E>> toImmutableMultiset(Function<? super T, ? extends E> elementFunction, ToIntFunction<? super T> countFunction)
toImmutableRangeMapback to summary
pack-priv static <T extends @Nullable Object, K extends Comparable<? super K>, V> Collector<T, ?, ImmutableRangeMap<K, V>> toImmutableRangeMap(Function<? super T, Range<K>> keyFunction, Function<? super T, ? extends V> valueFunction)
Annotations
@GwtIncompatible
toImmutableRangeSetback to summary
pack-priv static <E extends Comparable<? super E>> Collector<Range<E>, ?, ImmutableRangeSet<E>> toImmutableRangeSet()
Annotations
@GwtIncompatible
@SuppressWarnings:rawtypes, unchecked
toImmutableSetback to summary
pack-priv static <E> Collector<E, ?, ImmutableSet<E>> toImmutableSet()
Annotations
@SuppressWarnings:rawtypes, unchecked
toImmutableSetMultimapback to summary
pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableSetMultimap<K, V>> toImmutableSetMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)
toImmutableSortedMapback to summary
pack-priv static <T extends @Nullable Object, K, V> Collector<T, ?, ImmutableSortedMap<K, V>> toImmutableSortedMap(Comparator<? super K> comparator, Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction)
toImmutableSortedMapback to summary
pack-priv static <T extends @Nullable Object, 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)
toImmutableSortedSetback to summary
pack-priv static <E> Collector<E, ?, ImmutableSortedSet<E>> toImmutableSortedSet(Comparator<? super E> comparator)
toMultimapback to summary
pack-priv static <T extends @Nullable Object, K extends @Nullable Object, V extends @Nullable Object, M extends Multimap<K, V>> Collector<T, ?, M> toMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, Supplier<M> multimapSupplier)
toMultisetback to summary
pack-priv static <T extends @Nullable Object, E extends @Nullable Object, M extends Multiset<E>> Collector<T, ?, M> toMultiset(Function<? super T, E> elementFunction, ToIntFunction<? super T> countFunction, Supplier<M> multisetSupplier)
com.google.common.collect back to summary

private Class CollectCollectors.EnumMapAccumulator<K extends java.lang.Enum<K>, V>

extends Object
Class Inheritance
  • java.lang.Object
  • com.google.common.collect.CollectCollectors.EnumMapAccumulator
Annotations
@J2ktIncompatible

Field Summary

Modifier and TypeField and Description
private EnumMap<K, V>
private final BinaryOperator<V>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv CollectCollectors.EnumMapAccumulator<K, V>
pack-priv void
put(K key, V value)

pack-priv ImmutableMap<K, V>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mapback to summary
private EnumMap<K, V> map
Annotations
@CheckForNull
mergeFunctionback to summary
private final BinaryOperator<V> mergeFunction

Constructor Detail

EnumMapAccumulatorback to summary
pack-priv EnumMapAccumulator(BinaryOperator<V> mergeFunction)

Method Detail

combineback to summary
pack-priv CollectCollectors.EnumMapAccumulator<K, V> combine(CollectCollectors.EnumMapAccumulator<K, V> other)
putback to summary
pack-priv void put(K key, V value)
toImmutableMapback to summary
pack-priv ImmutableMap<K, V> toImmutableMap()
com.google.common.collect back to summary

private final Class CollectCollectors.EnumSetAccumulator<E extends java.lang.Enum<E>>

extends Object
Class Inheritance
  • java.lang.Object
  • com.google.common.collect.CollectCollectors.EnumSetAccumulator

Field Summary

Modifier and TypeField and Description
private EnumSet<E>
pack-priv static final Collector<Enum<?>, ?, ImmutableSet<? extends Enum<?>>>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv void
add(E e)

pack-priv CollectCollectors.EnumSetAccumulator<E>
pack-priv ImmutableSet<E>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

setback to summary
private EnumSet<E> set
Annotations
@CheckForNull
TO_IMMUTABLE_ENUM_SETback to summary
pack-priv static final Collector<Enum<?>, ?, ImmutableSet<? extends Enum<?>>> TO_IMMUTABLE_ENUM_SET
Annotations
@SuppressWarnings:rawtypes, unchecked

Constructor Detail

EnumSetAccumulatorback to summary
private EnumSetAccumulator()

Method Detail

addback to summary
pack-priv void add(E e)
combineback to summary
pack-priv CollectCollectors.EnumSetAccumulator<E> combine(CollectCollectors.EnumSetAccumulator<E> other)
toImmutableSetback to summary
pack-priv ImmutableSet<E> toImmutableSet()