Package graphql.collect
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
-
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()
-
Method Details
-
emptyMap
-
copyOf
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
Deprecated. -
remove
Deprecated. -
putAll
Deprecated. -
clear
Deprecated. -
keySet
-
values
-
entrySet
-
equals
-
hashCode
public int hashCode() -
getOrDefault
- Specified by:
getOrDefaultin interfaceMap<K,V>
-
forEach
-
replaceAll
@Deprecated(since="2020-11-10") public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) Deprecated.- Specified by:
replaceAllin interfaceMap<K,V>
-
putIfAbsent
Deprecated.- Specified by:
putIfAbsentin interfaceMap<K,V>
-
remove
Deprecated. -
replace
Deprecated. -
replace
Deprecated. -
computeIfAbsent
@Deprecated(since="2020-11-10") public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) Deprecated.- Specified by:
computeIfAbsentin interfaceMap<K,V>
-
computeIfPresent
@Deprecated(since="2020-11-10") public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) Deprecated.- Specified by:
computeIfPresentin interfaceMap<K,V>
-
compute
@Deprecated(since="2020-11-10") public V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) Deprecated. -
merge
@Deprecated(since="2020-11-10") public V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) Deprecated. -
toString
-