Package com.google.common.collect
Class ImmutableSortedMapFauxverideShim<K,V>
java.lang.Object
com.google.common.collect.ImmutableMap<K,V>
com.google.common.collect.ImmutableSortedMapFauxverideShim<K,V>
- All Implemented Interfaces:
Serializable,Map<K,V>
- Direct Known Subclasses:
ImmutableSortedMap
"Overrides" the
ImmutableMap static methods that lack ImmutableSortedMap
equivalents with deprecated, exception-throwing versions. See ImmutableSortedSetFauxverideShim for details.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableMap
ImmutableMap.Builder<K,V>, ImmutableMap.IteratorBasedImmutableMap<K, V>, ImmutableMap.SerializedForm<K, V> -
Field Summary
Fields inherited from class com.google.common.collect.ImmutableMap
EMPTY_ENTRY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> ImmutableSortedMap.Builder<K, V> builder()Deprecated.static <K,V> ImmutableSortedMap.Builder<K, V> builderWithExpectedSize(int expectedSize) Deprecated.Not supported for ImmutableSortedMap.static <K,V> ImmutableSortedMap<K, V> of(K k1, V v1) Deprecated.Pass a key of typeComparableto useImmutableSortedMap.of(Comparable, Object).static <K,V> ImmutableSortedMap<K, V> of(K k1, V v1, K k2, V v2) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object).static <K,V> ImmutableSortedMap<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object).static <K,V> ImmutableSortedMap<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).static <K,V> ImmutableSortedMap<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).static <K,V> ImmutableSortedMap<K, V> 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) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).static <K,V> ImmutableSortedMap<K, V> 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) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).static <K,V> ImmutableSortedMap<K, V> 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) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).static <K,V> ImmutableSortedMap<K, V> 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) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).static <K,V> ImmutableSortedMap<K, V> 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) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).static <K,V> ImmutableSortedMap<K, V> Deprecated.UseImmutableSortedMap.copyOf(ImmutableMap.ofEntries(...)).static <T,K, V> Collector<T, ?, ImmutableMap<K, V>> toImmutableMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) 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) Methods inherited from class com.google.common.collect.ImmutableMap
asMultimap, checkNoConflict, clear, compute, computeIfAbsent, computeIfPresent, conflictException, containsKey, containsValue, copyOf, copyOf, createEntrySet, createKeySet, createValues, entryOf, entrySet, equals, get, getOrDefault, hashCode, isEmpty, isHashCodeFast, isPartialView, keyIterator, keySet, keySpliterator, merge, of, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, toString, values, writeReplace
-
Constructor Details
-
ImmutableSortedMapFauxverideShim
ImmutableSortedMapFauxverideShim()
-
-
Method Details
-
toImmutableMap
@Deprecated public static <T,K, Collector<T,V> ?, toImmutableMapImmutableMap<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) Not supported. UseImmutableSortedMap.toImmutableSortedMap(java.util.Comparator<? super K>, java.util.function.Function<? super T, ? extends K>, java.util.function.Function<? super T, ? extends V>), which offers better type-safety, instead. This method exists only to hideImmutableMap.toImmutableMap(java.util.function.Function<? super T, ? extends K>, java.util.function.Function<? super T, ? extends V>)from consumers ofImmutableSortedMap.- Throws:
UnsupportedOperationException- always
-
toImmutableMap
@Deprecated public static <T,K, Collector<T,V> ?, toImmutableMapImmutableMap<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) Not supported. UseImmutableSortedMap.toImmutableSortedMap(java.util.Comparator<? super K>, java.util.function.Function<? super T, ? extends K>, java.util.function.Function<? super T, ? extends V>), which offers better type-safety, instead. This method exists only to hideImmutableMap.toImmutableMap(java.util.function.Function<? super T, ? extends K>, java.util.function.Function<? super T, ? extends V>)from consumers ofImmutableSortedMap.- Throws:
UnsupportedOperationException- always
-
builder
Deprecated.UseImmutableSortedMap.naturalOrder(), which offers better type-safety.Not supported. UseImmutableSortedMap.naturalOrder(), which offers better type-safety, instead. This method exists only to hideImmutableMap.builder()from consumers ofImmutableSortedMap.- Throws:
UnsupportedOperationException- always
-
builderWithExpectedSize
@Deprecated public static <K,V> ImmutableSortedMap.Builder<K,V> builderWithExpectedSize(int expectedSize) Deprecated.Not supported for ImmutableSortedMap.Not supported for ImmutableSortedMap.- Throws:
UnsupportedOperationException- always
-
of
Deprecated.Pass a key of typeComparableto useImmutableSortedMap.of(Comparable, Object).Not supported. You are attempting to create a map that may contain a non-Comparablekey. Proper calls will resolve to the version inImmutableSortedMap, not this dummy version.- Throws:
UnsupportedOperationException- always
-
of
Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object).Not supported. You are attempting to create a map that may contain non-Comparablekeys. Proper calls will resolve to the version inImmutableSortedMap, not this dummy version.- Throws:
UnsupportedOperationException- always
-
of
Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object).Not supported. You are attempting to create a map that may contain non-Comparablekeys. Proper calls to will resolve to the version inImmutableSortedMap, not this dummy version.- Throws:
UnsupportedOperationException- always
-
of
@Deprecated public static <K,V> ImmutableSortedMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).Not supported. You are attempting to create a map that may contain non-Comparablekeys. Proper calls will resolve to the version inImmutableSortedMap, not this dummy version.- Throws:
UnsupportedOperationException- always
-
of
@Deprecated public static <K,V> ImmutableSortedMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).Not supported. You are attempting to create a map that may contain non-Comparablekeys. Proper calls will resolve to the version inImmutableSortedMap, not this dummy version.- Throws:
UnsupportedOperationException- always
-
of
@Deprecated public static <K,V> ImmutableSortedMap<K,V> 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) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).Not supported. You are attempting to create a map that may contain non-Comparablekeys. Proper calls will resolve to the version inImmutableSortedMap, not this dummy version.- Throws:
UnsupportedOperationException- always
-
of
@Deprecated public static <K,V> ImmutableSortedMap<K,V> 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) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).Not supported. You are attempting to create a map that may contain non-Comparablekeys. Proper calls will resolve to the version inImmutableSortedMap, not this dummy version.- Throws:
UnsupportedOperationException- always
-
of
@Deprecated public static <K,V> ImmutableSortedMap<K,V> 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) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).Not supported. You are attempting to create a map that may contain non-Comparablekeys. Proper calls will resolve to the version inImmutableSortedMap, not this dummy version.- Throws:
UnsupportedOperationException- always
-
of
@Deprecated public static <K,V> ImmutableSortedMap<K,V> 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) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).Not supported. You are attempting to create a map that may contain non-Comparablekeys. Proper calls will resolve to the version inImmutableSortedMap, not this dummy version.- Throws:
UnsupportedOperationException- always
-
of
@Deprecated public static <K,V> ImmutableSortedMap<K,V> 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) Deprecated.Pass keys of typeComparableto useImmutableSortedMap.of(Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object, Comparable, Object).Not supported. You are attempting to create a map that may contain non-Comparablekeys. Proper calls will resolve to the version inImmutableSortedMap, not this dummy version.- Throws:
UnsupportedOperationException- always
-
ofEntries
@Deprecated public static <K,V> ImmutableSortedMap<K,V> ofEntries(Map.Entry<? extends K, ? extends V>... entries) Deprecated.UseImmutableSortedMap.copyOf(ImmutableMap.ofEntries(...)).Not supported. UseImmutableSortedMap.copyOf(ImmutableMap.ofEntries(...)).
-
ImmutableSortedMap.naturalOrder(), which offers better type-safety.