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:
java.io.Serializable,java.util.Map<K,V>
- Direct Known Subclasses:
ImmutableSortedMap
@GwtIncompatible abstract class ImmutableSortedMapFauxverideShim<K,V> extends ImmutableMap<K,V>
"Overrides" theImmutableMapstatic methods that lackImmutableSortedMapequivalents with deprecated, exception-throwing versions. SeeImmutableSortedSetFauxverideShimfor 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
-
-
Field Summary
-
Fields inherited from class com.google.common.collect.ImmutableMap
EMPTY_ENTRY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description ImmutableSortedMapFauxverideShim()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <K,V>
ImmutableSortedMap.Builder<K,V>builder()Deprecated.UseImmutableSortedMap.naturalOrder(), which offers better type-safety.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 <T,K,V>
java.util.stream.Collector<T,?,ImmutableMap<K,V>>toImmutableMap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.Function<? super T,? extends V> valueFunction)static <T,K,V>
java.util.stream.Collector<T,?,ImmutableMap<K,V>>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)-
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
-
-
-
-
Method Detail
-
toImmutableMap
@Deprecated public static <T,K,V> java.util.stream.Collector<T,?,ImmutableMap<K,V>> toImmutableMap(java.util.function.Function<? super T,? extends K> keyFunction, java.util.function.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:
java.lang.UnsupportedOperationException- always
-
toImmutableMap
@Deprecated public static <T,K,V> java.util.stream.Collector<T,?,ImmutableMap<K,V>> 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)
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:
java.lang.UnsupportedOperationException- always
-
builder
@Deprecated public static <K,V> ImmutableSortedMap.Builder<K,V> 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:
java.lang.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:
java.lang.UnsupportedOperationException- always
-
of
@Deprecated public static <K,V> ImmutableSortedMap<K,V> of(K k1, V v1)
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:
java.lang.UnsupportedOperationException- always
-
of
@Deprecated public 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).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:
java.lang.UnsupportedOperationException- always
-
of
@Deprecated public 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).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:
java.lang.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:
java.lang.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:
java.lang.UnsupportedOperationException- always
-
-