Uses of Class
com.google.common.collect.ImmutableMap
Packages that use ImmutableMap
Package
Description
Discouraged (in favor of Caffeine) caching utilities.
Collection interfaces and implementations, and other utilities for collections.
An API for representing graph (node and edge) data.
Utilities for reflection.
Testing utilities.
Concurrency utilities.
-
Uses of ImmutableMap in com.google.common.cache
Fields in com.google.common.cache declared as ImmutableMapModifier and TypeFieldDescriptionprivate static final ImmutableMap
<String, CacheBuilderSpec.ValueParser> CacheBuilderSpec.VALUE_PARSERS
Map of names to ValueParser.Methods in com.google.common.cache that return ImmutableMapModifier and TypeMethodDescriptionReturns a map of the values associated withkeys
, creating or retrieving those values if necessary.(package private) ImmutableMap
<K, V> AbstractCache.getAllPresent
(Iterable<? extends Object> keys) Returns a map of the values associated withkeys
in this cache.Cache.getAllPresent
(Iterable<? extends Object> keys) Returns a map of the values associated withkeys
in this cache.ForwardingCache.getAllPresent
(Iterable<? extends Object> keys) (package private) ImmutableMap
<K, V> LocalCache.getAllPresent
(Iterable<?> keys) LocalCache.LocalManualCache.getAllPresent
(Iterable<?> keys) -
Uses of ImmutableMap in com.google.common.collect
Subclasses of ImmutableMap in com.google.common.collectModifier and TypeClassDescriptionprivate final class
private final class
private static class
An immutable map implementation backed by an indexed nullable array.private final class
private final class
class
ImmutableBiMap<K,
V> ABiMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.(package private) final class
ImmutableEnumMap<K extends Enum<K>,
V> Implementation ofImmutableMap
backed by a non-emptyEnumMap
.(package private) static class
private final class
final class
ImmutableSortedMap<K,
V> ANavigableMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.(package private) final class
Implementation of ImmutableBiMap backed by a pair of JDK HashMaps, which have smartness protecting against hash flooding.(package private) final class
Implementation of ImmutableMap backed by a JDK HashMap, which has smartness protecting against hash flooding.(package private) class
Bimap with zero or more mappings.private final class
(package private) final class
RegularImmutableMap<K,
V> Implementation ofImmutableMap
used for 0 entries and for 2+ entries.(package private) final class
Implementation ofImmutableMap
with exactly one entry.Fields in com.google.common.collect declared as ImmutableMapModifier and TypeFieldDescriptionprivate final ImmutableMap
<C, Integer> ArrayTable.columnKeyToIndex
private final ImmutableMap
<C, Integer> DenseImmutableTable.columnKeyToIndex
private final ImmutableMap
<C, ImmutableMap<R, V>> DenseImmutableTable.columnMap
private final ImmutableMap
<C, ImmutableMap<R, V>> SparseImmutableTable.columnMap
private final ImmutableMap
<Class<? extends B>, B> ImmutableClassToInstanceMap.delegate
(package private) static final ImmutableMap
<Object, Object> RegularImmutableMap.EMPTY
(package private) final ImmutableMap
<E, Integer> Sets.PowerSet.inputSet
private final ImmutableMap
<E, Integer> Sets.SubSet.inputSet
private final ImmutableMap
<K, Integer> ArrayTable.ArrayMap.keyIndex
(package private) final ImmutableMap
<K, V> ImmutableMapEntrySet.EntrySetSerializedForm.map
private final ImmutableMap
<K, V> ImmutableMapEntrySet.RegularEntrySet.map
(package private) final ImmutableMap
<K, ?> ImmutableMapKeySet.KeySetSerializedForm.map
private final ImmutableMap
<K, V> ImmutableMapKeySet.map
private final ImmutableMap
<K, V> ImmutableMapValues.map
(package private) final ImmutableMap
<?, V> ImmutableMapValues.SerializedForm.map
(package private) final ImmutableMap
<K, ? extends ImmutableCollection<V>> ImmutableMultimap.map
(package private) final ImmutableMap
<K, ?> RegularImmutableMap.KeySet.SerializedForm.map
(package private) final ImmutableMap
<?, V> RegularImmutableMap.Values.SerializedForm.map
private final ImmutableMap
<Range<K>, V> ImmutableRangeMap.SerializedForm.mapOfRanges
(package private) final ImmutableMap
<T, Integer> ExplicitOrdering.rankMap
private final ImmutableMap
<R, Integer> ArrayTable.rowKeyToIndex
private final ImmutableMap
<R, Integer> DenseImmutableTable.rowKeyToIndex
private final ImmutableMap
<R, ImmutableMap<C, V>> DenseImmutableTable.rowMap
private final ImmutableMap
<R, ImmutableMap<C, V>> SparseImmutableTable.rowMap
Fields in com.google.common.collect with type parameters of type ImmutableMapModifier and TypeFieldDescriptionprivate final ImmutableMap
<C, ImmutableMap<R, V>> DenseImmutableTable.columnMap
private final ImmutableMap
<C, ImmutableMap<R, V>> SparseImmutableTable.columnMap
private final ImmutableMap
<R, ImmutableMap<C, V>> DenseImmutableTable.rowMap
private final ImmutableMap
<R, ImmutableMap<C, V>> SparseImmutableTable.rowMap
Methods in com.google.common.collect that return ImmutableMapModifier and TypeMethodDescriptionImmutableMap
<Range<K>, V> ImmutableRangeMap.asDescendingMapOfRanges()
(package private) static <K extends Enum<K>,
V>
ImmutableMap<K, V> ImmutableEnumMap.asImmutable
(EnumMap<K, V> map) EmptyImmutableListMultimap.asMap()
EmptyImmutableSetMultimap.asMap()
ImmutableMultimap.asMap()
Returns an immutable map that associates each key with its corresponding values in the multimap.ImmutableMap
<Range<K>, V> ImmutableRangeMap.asMapOfRanges()
ImmutableMap.Builder.build()
Returns a newly-created immutable map.private ImmutableMap
<K, V> ImmutableMap.Builder.build
(boolean throwIfDuplicateKeys) (package private) ImmutableMap
<K, V> ImmutableMap.Builder.buildJdkBacked()
ImmutableMap.Builder.buildKeepingLast()
Returns a newly-created immutable map, using the last value for any key that was added more than once.ImmutableMap.Builder.buildOrThrow()
Returns a newly-created immutable map, or throws an exception if any key was added more than once.Returns a view of all mappings that have the given column key.ImmutableMap
<C, Map<R, V>> DenseImmutableTable.columnMap()
abstract ImmutableMap
<C, Map<R, V>> ImmutableTable.columnMap()
Returns a view that associates each column key with the corresponding map from row keys to values.ImmutableMap
<C, Map<R, V>> SingletonImmutableTable.columnMap()
ImmutableMap
<C, Map<R, V>> SparseImmutableTable.columnMap()
static <K,
V> ImmutableMap <K, V> Returns an immutable map containing the specified entries.static <K,
V> ImmutableMap <K, V> Returns an immutable map containing the same entries asmap
.private static <K extends Enum<K>,
V>
ImmutableMap<K, ? extends V> ImmutableMap.copyOfEnumMap
(EnumMap<?, ? extends V> original) (package private) static <K,
V> ImmutableMap <K, V> Creates anImmutableMap
backed by a JDK HashMap.(package private) static <K,
V> ImmutableMap <K, V> RegularImmutableMap.fromEntries
(Map.Entry<K, V>... entries) (package private) static <K,
V> ImmutableMap <K, V> RegularImmutableMap.fromEntryArray
(int n, Map.Entry<K, V>[] entryArray, boolean throwIfDuplicateKeys) Creates an ImmutableMap from the first n entries in entryArray.private static <K,
V> ImmutableMap <K, V> RegularImmutableMap.fromEntryArrayCheckingBucketOverflow
(int n, Map.Entry<K, V>[] entryArray, boolean throwIfDuplicateKeys) static ImmutableMap
<String, String> Maps.fromProperties
(Properties properties) Creates anImmutableMap<String, String>
from aProperties
instance.(package private) ImmutableMap
<R, V> DenseImmutableTable.ColumnMap.getValue
(int keyIndex) (package private) ImmutableMap
<C, V> DenseImmutableTable.RowMap.getValue
(int keyIndex) static <K extends Enum<K>,
V>
ImmutableMap<K, V> Maps.immutableEnumMap
(Map<K, ? extends V> map) Returns an immutable map instance containing the given entries.(package private) static <E> ImmutableMap
<E, Integer> Maps.indexMap
(Collection<E> list) Returns a map from the ith element of list to i.(package private) ImmutableMap
<R, Integer> DenseImmutableTable.Column.keyToIndex()
(package private) ImmutableMap
<C, Integer> DenseImmutableTable.ColumnMap.keyToIndex()
(package private) abstract ImmutableMap
<K, Integer> DenseImmutableTable.ImmutableArrayMap.keyToIndex()
(package private) ImmutableMap
<C, Integer> DenseImmutableTable.Row.keyToIndex()
(package private) ImmutableMap
<R, Integer> DenseImmutableTable.RowMap.keyToIndex()
(package private) abstract ImmutableMap
<K, V> ImmutableMapEntrySet.map()
(package private) ImmutableMap
<K, V> ImmutableMapEntrySet.RegularEntrySet.map()
(package private) ImmutableMap
<V, K> RegularImmutableBiMap.Inverse.InverseEntrySet.map()
static <K,
V> ImmutableMap <K, V> ImmutableMap.of()
Returns the empty map.static <K,
V> ImmutableMap <K, V> ImmutableMap.of
(K k1, V v1) Returns an immutable map containing a single entry.static <K,
V> ImmutableMap <K, V> ImmutableMap.of
(K k1, V v1, K k2, V v2) Returns an immutable map containing the given entries, in order.static <K,
V> ImmutableMap <K, V> ImmutableMap.of
(K k1, V v1, K k2, V v2, K k3, V v3) Returns an immutable map containing the given entries, in order.static <K,
V> ImmutableMap <K, V> ImmutableMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) Returns an immutable map containing the given entries, in order.static <K,
V> ImmutableMap <K, V> ImmutableMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) Returns an immutable map containing the given entries, in order.static <K,
V> ImmutableMap <K, V> ImmutableMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6) Returns an immutable map containing the given entries, in order.static <K,
V> ImmutableMap <K, V> ImmutableMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7) Returns an immutable map containing the given entries, in order.static <K,
V> ImmutableMap <K, V> ImmutableMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8) Returns an immutable map containing the given entries, in order.static <K,
V> ImmutableMap <K, V> ImmutableMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9) Returns an immutable map containing the given entries, in order.static <K,
V> ImmutableMap <K, V> ImmutableMap.of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10) Returns an immutable map containing the given entries, in order.static <K,
V> ImmutableMap <K, V> Returns an immutable map containing the given entries, in order.Returns a view of all mappings that have the given row key.ImmutableMap
<R, Map<C, V>> DenseImmutableTable.rowMap()
abstract ImmutableMap
<R, Map<C, V>> ImmutableTable.rowMap()
Returns a view that associates each row key with the corresponding map from column keys to values.ImmutableMap
<R, Map<C, V>> SingletonImmutableTable.rowMap()
ImmutableMap
<R, Map<C, V>> SparseImmutableTable.rowMap()
(package private) ImmutableMap
<K, V> CollectCollectors.EnumMapAccumulator.toImmutableMap()
final <V> ImmutableMap
<E, V> Returns an immutable map whose keys are the distinct elements of thisFluentIterable
and whose value for each key was computed byvalueFunction
.static <K,
V> ImmutableMap <K, V> Returns an immutable map whose keys are the distinct elements ofkeys
and whose value for each key was computed byvalueFunction
.static <K,
V> ImmutableMap <K, V> Returns an immutable map whose keys are the distinct elements ofkeys
and whose value for each key was computed byvalueFunction
.final <K> ImmutableMap
<K, E> FluentIterable.uniqueIndex
(Function<? super E, K> keyFunction) Returns a map with the contents of thisFluentIterable
as itsvalues
, indexed by keys derived from those values.static <K,
V> ImmutableMap <K, V> Maps.uniqueIndex
(Iterable<V> values, Function<? super V, K> keyFunction) Returns a map with the givenvalues
, indexed by keys derived from those values.static <K,
V> ImmutableMap <K, V> Maps.uniqueIndex
(Iterator<V> values, Function<? super V, K> keyFunction) Returns a map with the givenvalues
, indexed by keys derived from those values.private static <K,
V> ImmutableMap <K, V> Maps.uniqueIndex
(Iterator<V> values, Function<? super V, K> keyFunction, ImmutableMap.Builder<K, V> builder) Methods in com.google.common.collect that return types with arguments of type ImmutableMapModifier and TypeMethodDescription(package private) static <T,
K extends Enum<K>, V>
Collector<T, ?, ImmutableMap<K, V>> CollectCollectors.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>> CollectCollectors.toImmutableEnumMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) static <T,
K extends Enum<K>, V>
Collector<T, ?, ImmutableMap<K, V>> Maps.toImmutableEnumMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) Returns aCollector
that accumulates elements into anImmutableMap
whose keys and values are the result of applying the provided mapping functions to the input elements.static <T,
K extends Enum<K>, V>
Collector<T, ?, ImmutableMap<K, V>> Maps.toImmutableEnumMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) Returns aCollector
that accumulates elements into anImmutableMap
whose keys and values are the result of applying the provided mapping functions to the input elements.(package private) static <T,
K, V> Collector <T, ?, ImmutableMap<K, V>> CollectCollectors.toImmutableMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) (package private) static <T,
K, V> Collector <T, ?, ImmutableMap<K, V>> CollectCollectors.toImmutableMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) static <T,
K, V> Collector <T, ?, ImmutableMap<K, V>> ImmutableBiMap.toImmutableMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) Deprecated.static <T,
K, V> Collector <T, ?, ImmutableMap<K, V>> ImmutableBiMap.toImmutableMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) Deprecated.static <T,
K, V> Collector <T, ?, ImmutableMap<K, V>> ImmutableMap.toImmutableMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) Returns aCollector
that accumulates elements into anImmutableMap
whose keys and values are the result of applying the provided mapping functions to the input elements.static <T,
K, V> Collector <T, ?, ImmutableMap<K, V>> ImmutableMap.toImmutableMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) Returns aCollector
that accumulates elements into anImmutableMap
whose keys and values are the result of applying the provided mapping functions to the input elements.static <T,
K, V> Collector <T, ?, ImmutableMap<K, V>> ImmutableSortedMap.toImmutableMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) static <T,
K, V> Collector <T, ?, ImmutableMap<K, V>> ImmutableSortedMap.toImmutableMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) Constructors in com.google.common.collect with parameters of type ImmutableMapModifierConstructorDescriptionprivate
ArrayMap
(ImmutableMap<K, Integer> keyIndex) (package private)
EntrySetSerializedForm
(ImmutableMap<K, V> map) (package private)
ExplicitOrdering
(ImmutableMap<T, Integer> rankMap) private
ImmutableClassToInstanceMap
(ImmutableMap<Class<? extends B>, B> delegate) (package private)
ImmutableListMultimap
(ImmutableMap<K, ImmutableList<V>> map, int size) (package private)
ImmutableMapKeySet
(ImmutableMap<K, V> map) (package private)
ImmutableMapValues
(ImmutableMap<K, V> map) (package private)
ImmutableMultimap
(ImmutableMap<K, ? extends ImmutableCollection<V>> map, int size) (package private)
ImmutableSetMultimap
(ImmutableMap<K, ImmutableSet<V>> map, int size, Comparator<? super V> valueComparator) (package private)
KeySetSerializedForm
(ImmutableMap<K, ?> map) (package private)
RegularEntrySet
(ImmutableMap<K, V> map, ImmutableList<Map.Entry<K, V>> entries) (package private)
RegularEntrySet
(ImmutableMap<K, V> map, Map.Entry<K, V>[] entries) (package private)
SerializedForm
(ImmutableMap<K, V> map) (package private)
SerializedForm
(ImmutableMap<?, V> map) (package private)
SerializedForm
(ImmutableMap<Range<K>, V> mapOfRanges) (package private)
SerializedForm
(ImmutableMap<K, ?> map) (package private)
SerializedForm
(ImmutableMap<?, V> map) (package private)
SubSet
(ImmutableMap<E, Integer> inputSet, int mask) -
Uses of ImmutableMap in com.google.common.graph
Methods in com.google.common.graph that return ImmutableMapModifier and TypeMethodDescriptionprivate static <N> ImmutableMap
<N, GraphConnections<N, GraphConstants.Presence>> ImmutableGraph.getNodeConnections
(Graph<N> graph) private static <N,
V> ImmutableMap <N, GraphConnections<N, V>> ImmutableValueGraph.getNodeConnections
(ValueGraph<N, V> graph) -
Uses of ImmutableMap in com.google.common.reflect
Fields in com.google.common.reflect declared as ImmutableMapModifier and TypeFieldDescriptionprivate final ImmutableMap
<TypeToken<? extends B>, B> ImmutableTypeToInstanceMap.delegate
private final ImmutableMap
<TypeResolver.TypeVariableKey, Type> TypeResolver.TypeTable.map
private static final ImmutableMap
<String, Method> Types.TypeVariableInvocationHandler.typeVariableMethods
Methods in com.google.common.reflect that return ImmutableMapModifier and TypeMethodDescription(package private) static ImmutableMap
<File, ClassLoader> ClassPath.getClassPathEntries
(ClassLoader classloader) (package private) static ImmutableMap
<TypeResolver.TypeVariableKey, Type> TypeResolver.TypeMappingIntrospector.getTypeMappings
(Type contextType) Returns type mappings using type parameters and type arguments found in the generic superclass and the super interfaces ofcontextClass
.Constructors in com.google.common.reflect with parameters of type ImmutableMapModifierConstructorDescriptionprivate
ImmutableTypeToInstanceMap
(ImmutableMap<TypeToken<? extends B>, B> delegate) private
-
Uses of ImmutableMap in com.google.common.testing
Fields in com.google.common.testing declared as ImmutableMapModifier and TypeFieldDescriptionprivate static final ImmutableMap
<Class<?>, Method> FreshValueGenerator.EMPTY_GENERATORS
private static final ImmutableMap
<Class<?>, Method> FreshValueGenerator.GENERATORS
Methods in com.google.common.testing that return ImmutableMapModifier and TypeMethodDescription(package private) static <K,
V> ImmutableMap <K, V> FreshValueGenerator.generateImmutableMap
(K key, V value) -
Uses of ImmutableMap in com.google.common.util.concurrent
Methods in com.google.common.util.concurrent that return ImmutableMapModifier and TypeMethodDescriptionServiceManager.startupDurations()
Returns the service load times.(package private) ImmutableMap
<Service, Long> ServiceManager.ServiceManagerState.startupTimes()
ServiceManager.startupTimes()
Returns the service load times. -
Uses of ImmutableMap in com.google.thirdparty.publicsuffix
Fields in com.google.thirdparty.publicsuffix declared as ImmutableMapModifier and TypeFieldDescriptionstatic final ImmutableMap
<String, PublicSuffixType> PublicSuffixPatterns.EXACT
If a hostname is contained as a key in this map, it is a public suffix.static final ImmutableMap
<String, PublicSuffixType> PublicSuffixPatterns.EXCLUDED
The elements in this map would pass the UNDER test, but are known not to be public suffixes and are thus excluded from consideration.static final ImmutableMap
<String, PublicSuffixType> PublicSuffixPatterns.UNDER
If a hostname is not a key in the EXCLUDE map, and if removing its leftmost component results in a name which is a key in this map, it is a public suffix.Methods in com.google.thirdparty.publicsuffix that return ImmutableMapModifier and TypeMethodDescription(package private) static ImmutableMap
<String, PublicSuffixType> TrieParser.parseFullString
(String encoded) (package private) static ImmutableMap
<String, PublicSuffixType> TrieParser.parseTrie
(CharSequence... encodedChunks) Parses a serialized trie representation of a map of reversed public suffixes into an immutable map of public suffixes.
ImmutableBiMap.toImmutableBiMap(java.util.function.Function<? super T, ? extends K>, java.util.function.Function<? super T, ? extends V>)
.