Class GuardianStringKeyMultivaluedMap<V>
java.lang.Object
org.glassfish.jersey.internal.util.collection.GuardianStringKeyMultivaluedMap<V>
- Type Parameters:
V
- The value type of the wrappedMultivaluedMap
.
- All Implemented Interfaces:
MultivaluedMap<String,
,V> Map<String,
List<V>>
The
MultivaluedMap
wrapper that is able to set guards observing changes of values represented by a key.- Since:
- 2.38
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
boolean
equalsIgnoreValueOrder
(MultivaluedMap<String, V> otherMap) Get all the guarded keysint
hashCode()
boolean
isEmpty()
boolean
isObservedAndReset
(String key) Return true when the value represented by the key has changed.keySet()
void
void
void
Observe changes of a value represented by the key.int
size()
toString()
Collection<List<V>>
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 Details
-
GuardianStringKeyMultivaluedMap
-
-
Method Details
-
putSingle
- Specified by:
putSingle
in interfaceMultivaluedMap<String,
V>
-
add
- Specified by:
add
in interfaceMultivaluedMap<String,
V>
-
getFirst
- Specified by:
getFirst
in interfaceMultivaluedMap<String,
V>
-
addAll
- Specified by:
addAll
in interfaceMultivaluedMap<String,
V>
-
addAll
- Specified by:
addAll
in interfaceMultivaluedMap<String,
V>
-
addFirst
- Specified by:
addFirst
in interfaceMultivaluedMap<String,
V>
-
equalsIgnoreValueOrder
- Specified by:
equalsIgnoreValueOrder
in interfaceMultivaluedMap<String,
V>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<String,
List<V>>
-
containsValue
- Specified by:
containsValue
in interfaceMap<String,
List<V>>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
setGuard
Observe changes of a value represented by the key.- Parameters:
key
- the key values to observe
-
getGuards
Get all the guarded keys- Returns:
- a
Set
of keys guarded.
-
isObservedAndReset
Return true when the value represented by the key has changed. Resets any observation - the operation is not idempotent.- Parameters:
key
- the Key observed.- Returns:
- whether the value represented by the key has changed.
-
toString
-
equals
-
hashCode
public int hashCode()
-