Uses of Class
com.google.common.collect.ImmutableMap
Packages that use ImmutableMap
Package
Description
This package contains caching utilities.
This package contains generic collection interfaces and implementations, and other utilities for
working with collections.
Concurrency utilities.
-
Uses of ImmutableMap in com.google.common.cache
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.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) -
Uses of ImmutableMap in com.google.common.collect
Subclasses of ImmutableMap in com.google.common.collectModifier and TypeClassDescriptionclass
ImmutableBiMap<K,
V> ABiMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.final class
ImmutableSortedMap<K,
V> ANavigableMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.Methods in com.google.common.collect that return ImmutableMapModifier and TypeMethodDescriptionImmutableMap<Range<K>,
V> ImmutableRangeMap.asDescendingMapOfRanges()
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.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.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.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
.static ImmutableMap<String,
String> Maps.fromProperties
(Properties properties) Creates anImmutableMap<String, String>
from aProperties
instance.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.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.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.final <V> ImmutableMap<@NonNull 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,
@NonNull 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.Methods in com.google.common.collect that return types with arguments of type ImmutableMapModifier and TypeMethodDescriptionstatic <T extends @Nullable Object,
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 extends @Nullable Object,
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.static <T extends @Nullable Object,
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 extends @Nullable Object,
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. -
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.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.