Class ImmutableMapWithNullValues<K,V>
java.lang.Object
graphql.collect.ImmutableMapWithNullValues<K,V>
- Type Parameters:
K- for keyV- for victory
- All Implemented Interfaces:
Map<K,V>
The standard ImmutableMap does not allow null values. The implementation does.
We have cases in graphql, around arguments where a map entry can be explicitly set to null
and we want immutable smart maps for these cases.
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateOnly used to construct the singleton empty mapprivateImmutableMapWithNullValues(Map<K, V> values) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Deprecated.Deprecated.computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) Deprecated.computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) Deprecated.booleancontainsKey(Object key) booleancontainsValue(Object value) static <K,V> ImmutableMapWithNullValues <K, V> static <K,V> ImmutableMapWithNullValues <K, V> emptyMap()entrySet()booleanvoidforEach(BiConsumer<? super K, ? super V> action) getOrDefault(Object key, V defaultValue) inthashCode()booleanisEmpty()keySet()Deprecated.Deprecated.voidDeprecated.putIfAbsent(K key, V value) Deprecated.Deprecated.booleanDeprecated.Deprecated.booleanDeprecated.voidreplaceAll(BiFunction<? super K, ? super V, ? extends V> function) Deprecated.intsize()toString()values()
-
Field Details
-
delegate
-
emptyMap
-
-
Constructor Details
-
ImmutableMapWithNullValues
-
ImmutableMapWithNullValues
private ImmutableMapWithNullValues()Only used to construct the singleton empty map
-
-
Method Details
-
emptyMap
-
copyOf
-
size
-
isEmpty
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
-
putAll
-
clear
-
keySet
-
values
-
entrySet
-
equals
-
hashCode
-
getOrDefault
-
forEach
-
replaceAll
Deprecated.- Specified by:
replaceAllin interfaceMap<K,V>
-
putIfAbsent
Deprecated.- Specified by:
putIfAbsentin interfaceMap<K,V>
-
remove
-
replace
-
replace
-
computeIfAbsent
Deprecated.- Specified by:
computeIfAbsentin interfaceMap<K,V>
-
computeIfPresent
@Deprecated public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) Deprecated.- Specified by:
computeIfPresentin interfaceMap<K,V>
-
compute
-
merge
-
toString
-