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:
java.util.Map<K,V>
public final class ImmutableMapWithNullValues<K,V> extends java.lang.Object implements java.util.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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Deprecated.V
compute(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)
Deprecated.V
computeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingFunction)
Deprecated.V
computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)
Deprecated.boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
static <K,V>
ImmutableMapWithNullValues<K,V>copyOf(java.util.Map<K,V> map)
static <K,V>
ImmutableMapWithNullValues<K,V>emptyMap()
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
boolean
equals(java.lang.Object o)
void
forEach(java.util.function.BiConsumer<? super K,? super V> action)
V
get(java.lang.Object key)
V
getOrDefault(java.lang.Object key, V defaultValue)
int
hashCode()
boolean
isEmpty()
java.util.Set<K>
keySet()
V
merge(K key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> remappingFunction)
Deprecated.V
put(K key, V value)
Deprecated.void
putAll(java.util.Map<? extends K,? extends V> m)
Deprecated.V
putIfAbsent(K key, V value)
Deprecated.V
remove(java.lang.Object key)
Deprecated.boolean
remove(java.lang.Object key, java.lang.Object value)
Deprecated.V
replace(K key, V value)
Deprecated.boolean
replace(K key, V oldValue, V newValue)
Deprecated.void
replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function)
Deprecated.int
size()
java.lang.String
toString()
java.util.Collection<V>
values()
-
-
-
Method Detail
-
emptyMap
public static <K,V> ImmutableMapWithNullValues<K,V> emptyMap()
-
copyOf
public static <K,V> ImmutableMapWithNullValues<K,V> copyOf(java.util.Map<K,V> map)
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
remove
@Deprecated(since="2020-11-10") public V remove(java.lang.Object key)
Deprecated.
-
putAll
@Deprecated(since="2020-11-10") public void putAll(java.util.Map<? extends K,? extends V> m)
Deprecated.
-
clear
@Deprecated(since="2020-11-10") public void clear()
Deprecated.
-
values
public java.util.Collection<V> values()
-
equals
public boolean equals(java.lang.Object o)
-
hashCode
public int hashCode()
-
replaceAll
@Deprecated(since="2020-11-10") public void replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function)
Deprecated.
-
remove
@Deprecated(since="2020-11-10") public boolean remove(java.lang.Object key, java.lang.Object value)
Deprecated.
-
replace
@Deprecated(since="2020-11-10") public boolean replace(K key, V oldValue, V newValue)
Deprecated.
-
computeIfAbsent
@Deprecated(since="2020-11-10") public V computeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingFunction)
Deprecated.
-
computeIfPresent
@Deprecated(since="2020-11-10") public V computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)
Deprecated.
-
compute
@Deprecated(since="2020-11-10") public V compute(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)
Deprecated.
-
merge
@Deprecated(since="2020-11-10") public V merge(K key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> remappingFunction)
Deprecated.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-