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 voidclear()Deprecated.Vcompute(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)Deprecated.VcomputeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingFunction)Deprecated.VcomputeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)Deprecated.booleancontainsKey(java.lang.Object key)booleancontainsValue(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()booleanequals(java.lang.Object o)voidforEach(java.util.function.BiConsumer<? super K,? super V> action)Vget(java.lang.Object key)VgetOrDefault(java.lang.Object key, V defaultValue)inthashCode()booleanisEmpty()java.util.Set<K>keySet()Vmerge(K key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> remappingFunction)Deprecated.Vput(K key, V value)Deprecated.voidputAll(java.util.Map<? extends K,? extends V> m)Deprecated.VputIfAbsent(K key, V value)Deprecated.Vremove(java.lang.Object key)Deprecated.booleanremove(java.lang.Object key, java.lang.Object value)Deprecated.Vreplace(K key, V value)Deprecated.booleanreplace(K key, V oldValue, V newValue)Deprecated.voidreplaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function)Deprecated.intsize()java.lang.StringtoString()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 public V remove(java.lang.Object key)
Deprecated.
-
clear
@Deprecated 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 public void replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function)
Deprecated.
-
remove
@Deprecated public boolean remove(java.lang.Object key, java.lang.Object value)Deprecated.
-
computeIfAbsent
@Deprecated public V computeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingFunction)
Deprecated.
-
computeIfPresent
@Deprecated public V computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)
Deprecated.
-
compute
@Deprecated public V compute(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFunction)
Deprecated.
-
merge
@Deprecated 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:
toStringin classjava.lang.Object
-
-