Class NullableMultivaluedHashMap<K,V>
- java.lang.Object
-
- jakarta.ws.rs.core.AbstractMultivaluedMap<K,V>
-
- jakarta.ws.rs.core.MultivaluedHashMap<K,V>
-
- org.glassfish.jersey.internal.util.collection.NullableMultivaluedHashMap<K,V>
-
- Type Parameters:
K- the type of keys maintained by this mapV- the type of mapped values which can containnullvalues
- All Implemented Interfaces:
MultivaluedMap<K,V>,Serializable,Map<K,List<V>>
public class NullableMultivaluedHashMap<K,V> extends MultivaluedHashMap<K,V>
An implementation ofMultivaluedMapwhere values can benull.- Author:
- Petr Bouda
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class jakarta.ws.rs.core.AbstractMultivaluedMap
store
-
-
Constructor Summary
Constructors Constructor Description NullableMultivaluedHashMap()NullableMultivaluedHashMap(int initialCapacity)NullableMultivaluedHashMap(int initialCapacity, float loadFactor)NullableMultivaluedHashMap(MultivaluedMap<? extends K,? extends V> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddFirstNull(List<V> values)Define the behavior for adding anullvalues to the first position in the value list.protected voidaddNull(List<V> values)Define the behavior for adding anullvalues to the value list.-
Methods inherited from class jakarta.ws.rs.core.AbstractMultivaluedMap
add, addAll, addAll, addFirst, clear, containsKey, containsValue, entrySet, equals, equalsIgnoreValueOrder, get, getFirst, getValues, hashCode, isEmpty, keySet, put, putAll, putSingle, remove, size, toString, values
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
NullableMultivaluedHashMap
public NullableMultivaluedHashMap()
-
NullableMultivaluedHashMap
public NullableMultivaluedHashMap(int initialCapacity)
-
NullableMultivaluedHashMap
public NullableMultivaluedHashMap(int initialCapacity, float loadFactor)
-
NullableMultivaluedHashMap
public NullableMultivaluedHashMap(MultivaluedMap<? extends K,? extends V> map)
-
-
Method Detail
-
addFirstNull
protected void addFirstNull(List<V> values)
Description copied from class:AbstractMultivaluedMapDefine the behavior for adding a
Default implementation is a no-op, i.e. thenullvalues to the first position in the value list.nullvalues are ignored. Overriding implementations may modify this behavior by providing their own definitions of this method.- Overrides:
addFirstNullin classAbstractMultivaluedMap<K,V>- Parameters:
values- value list where thenullvalue addition is being requested.
-
addNull
protected void addNull(List<V> values)
Description copied from class:AbstractMultivaluedMapDefine the behavior for adding a
Default implementation is a no-op, i.e. thenullvalues to the value list.nullvalues are ignored. Overriding implementations may modify this behavior by providing their own definitions of this method.- Overrides:
addNullin classAbstractMultivaluedMap<K,V>- Parameters:
values- value list where thenullvalue addition is being requested.
-
-