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 TypeMethodDescriptionvoid
clear()
Deprecated.Deprecated.computeIfAbsent
(K key, Function<? super K, ? extends V> mappingFunction) Deprecated.computeIfPresent
(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) Deprecated.boolean
containsKey
(Object key) boolean
containsValue
(Object value) static <K,
V> ImmutableMapWithNullValues <K, V> static <K,
V> ImmutableMapWithNullValues <K, V> emptyMap()
entrySet()
boolean
void
forEach
(BiConsumer<? super K, ? super V> action) getOrDefault
(Object key, V defaultValue) int
hashCode()
boolean
isEmpty()
keySet()
Deprecated.Deprecated.void
Deprecated.putIfAbsent
(K key, V value) Deprecated.Deprecated.boolean
Deprecated.Deprecated.boolean
Deprecated.void
replaceAll
(BiFunction<? super K, ? super V, ? extends V> function) Deprecated.int
size()
toString()
values()
-
Method Details
-
emptyMap
-
copyOf
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
get
-
put
Deprecated. -
remove
Deprecated. -
putAll
Deprecated. -
clear
Deprecated. -
keySet
-
values
-
entrySet
-
equals
-
hashCode
public int hashCode() -
getOrDefault
- Specified by:
getOrDefault
in interfaceMap<K,
V>
-
forEach
-
replaceAll
@Deprecated(since="2020-11-10") public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) Deprecated.- Specified by:
replaceAll
in interfaceMap<K,
V>
-
putIfAbsent
Deprecated.- Specified by:
putIfAbsent
in 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:
computeIfAbsent
in 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:
computeIfPresent
in 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
-