Uses of Class
com.google.common.collect.ImmutableMap
-
Packages that use ImmutableMap Package Description com.google.common.cache Discouraged (in favor of Caffeine) caching utilities.com.google.common.collect Collection interfaces and implementations, and other utilities for collections.com.google.common.util.concurrent Concurrency utilities. -
-
Uses of ImmutableMap in com.google.common.cache
Methods in com.google.common.cache that return ImmutableMap Modifier and Type Method Description ImmutableMap<K,V>AbstractLoadingCache. getAll(java.lang.Iterable<? extends K> keys)ImmutableMap<K,V>ForwardingLoadingCache. getAll(java.lang.Iterable<? extends K> keys)ImmutableMap<K,V>LoadingCache. getAll(java.lang.Iterable<? extends K> keys)Returns a map of the values associated withkeys, creating or retrieving those values if necessary.ImmutableMap<K,V>AbstractCache. getAllPresent(java.lang.Iterable<? extends java.lang.Object> keys)Returns a map of the values associated withkeysin this cache.ImmutableMap<K,V>Cache. getAllPresent(java.lang.Iterable<? extends java.lang.Object> keys)Returns a map of the values associated withkeysin this cache.ImmutableMap<K,V>ForwardingCache. getAllPresent(java.lang.Iterable<? extends java.lang.Object> keys) -
Uses of ImmutableMap in com.google.common.collect
Subclasses of ImmutableMap in com.google.common.collect Modifier and Type Class Description classImmutableBiMap<K,V>ABiMapwhose contents will never change, with many other important properties detailed atImmutableCollection.classImmutableSortedMap<K,V>ANavigableMapwhose contents will never change, with many other important properties detailed atImmutableCollection.Methods in com.google.common.collect that return ImmutableMap Modifier and Type Method Description ImmutableMap<Range<K>,V>ImmutableRangeMap. asDescendingMapOfRanges()ImmutableMap<K,java.util.Collection<V>>ImmutableMultimap. asMap()Returns an immutable map that associates each key with its corresponding values in the multimap.ImmutableMap<Range<K>,V>ImmutableRangeMap. asMapOfRanges()ImmutableMap<K,V>ImmutableMap.Builder. build()Returns a newly-created immutable map.ImmutableMap<K,V>ImmutableMap.Builder. buildKeepingLast()Returns a newly-created immutable map, using the last value for any key that was added more than once.ImmutableMap<K,V>ImmutableMap.Builder. buildOrThrow()Returns a newly-created immutable map, or throws an exception if any key was added more than once.ImmutableMap<R,V>ImmutableTable. column(C columnKey)Returns a view of all mappings that have the given column key.abstract ImmutableMap<C,java.util.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>ImmutableMap. copyOf(java.lang.Iterable<? extends java.util.Map.Entry<? extends K,? extends V>> entries)Returns an immutable map containing the specified entries.static <K,V>
ImmutableMap<K,V>ImmutableMap. copyOf(java.util.Map<? extends K,? extends V> map)Returns an immutable map containing the same entries asmap.static ImmutableMap<java.lang.String,java.lang.String>Maps. fromProperties(java.util.Properties properties)Creates anImmutableMap<String, String>from aPropertiesinstance.static <K extends java.lang.Enum<K>,V>
ImmutableMap<K,V>Maps. immutableEnumMap(java.util.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>ImmutableMap. ofEntries(java.util.Map.Entry<? extends K,? extends V>... entries)Returns an immutable map containing the given entries, in order.ImmutableMap<C,V>ImmutableTable. row(R rowKey)Returns a view of all mappings that have the given row key.abstract ImmutableMap<R,java.util.Map<C,V>>ImmutableTable. rowMap()Returns a view that associates each row key with the corresponding map from column keys to values.<V> ImmutableMap<@NonNull E,V>FluentIterable. toMap(Function<? super E,V> valueFunction)Returns an immutable map whose keys are the distinct elements of thisFluentIterableand whose value for each key was computed byvalueFunction.static <K,V>
ImmutableMap<K,V>Maps. toMap(java.lang.Iterable<K> keys, Function<? super K,V> valueFunction)Returns an immutable map whose keys are the distinct elements ofkeysand whose value for each key was computed byvalueFunction.static <K,V>
ImmutableMap<K,V>Maps. toMap(java.util.Iterator<K> keys, Function<? super K,V> valueFunction)Returns an immutable map whose keys are the distinct elements ofkeysand whose value for each key was computed byvalueFunction.<K> ImmutableMap<K,@NonNull E>FluentIterable. uniqueIndex(Function<? super E,K> keyFunction)Returns a map with the contents of thisFluentIterableas itsvalues, indexed by keys derived from those values.static <K,V>
ImmutableMap<K,V>Maps. uniqueIndex(java.lang.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(java.util.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 ImmutableMap Modifier and Type Method Description static <T extends @Nullable java.lang.Object,K extends java.lang.Enum<K>,V>
java.util.stream.Collector<T,?,ImmutableMap<K,V>>Maps. toImmutableEnumMap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends V> valueFunction)Returns aCollectorthat accumulates elements into anImmutableMapwhose keys and values are the result of applying the provided mapping functions to the input elements.static <T extends @Nullable java.lang.Object,K extends java.lang.Enum<K>,V>
java.util.stream.Collector<T,?,ImmutableMap<K,V>>Maps. toImmutableEnumMap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends V> valueFunction, java.util.function.BinaryOperator<V> mergeFunction)Returns aCollectorthat accumulates elements into anImmutableMapwhose keys and values are the result of applying the provided mapping functions to the input elements.static <T extends @Nullable java.lang.Object,K,V>
java.util.stream.Collector<T,?,ImmutableMap<K,V>>ImmutableBiMap. toImmutableMap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends V> valueFunction)static <T extends @Nullable java.lang.Object,K,V>
java.util.stream.Collector<T,?,ImmutableMap<K,V>>ImmutableBiMap. toImmutableMap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends V> valueFunction, java.util.function.BinaryOperator<V> mergeFunction)Deprecated.static <T extends @Nullable java.lang.Object,K,V>
java.util.stream.Collector<T,?,ImmutableMap<K,V>>ImmutableMap. toImmutableMap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends V> valueFunction)Returns aCollectorthat accumulates elements into anImmutableMapwhose keys and values are the result of applying the provided mapping functions to the input elements.static <T extends @Nullable java.lang.Object,K,V>
java.util.stream.Collector<T,?,ImmutableMap<K,V>>ImmutableMap. toImmutableMap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends V> valueFunction, java.util.function.BinaryOperator<V> mergeFunction)Returns aCollectorthat accumulates elements into anImmutableMapwhose keys and values are the result of applying the provided mapping functions to the input elements.static <T extends @Nullable java.lang.Object,K,V>
java.util.stream.Collector<T,?,ImmutableMap<K,V>>ImmutableSortedMap. toImmutableMap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends V> valueFunction)static <T extends @Nullable java.lang.Object,K,V>
java.util.stream.Collector<T,?,ImmutableMap<K,V>>ImmutableSortedMap. toImmutableMap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends V> valueFunction, java.util.function.BinaryOperator<V> mergeFunction) -
Uses of ImmutableMap in com.google.common.util.concurrent
Methods in com.google.common.util.concurrent that return ImmutableMap Modifier and Type Method Description ImmutableMap<Service,java.time.Duration>ServiceManager. startupDurations()Returns the service load times.ImmutableMap<Service,java.lang.Long>ServiceManager. startupTimes()Returns the service load times.
-