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 TypeMethodDescriptionvoidvoidvoidvoidvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanbooleanequalsIgnoreValueOrder(MultivaluedMap<String, V> otherMap) Get all the guarded keysinthashCode()booleanisEmpty()booleanisObservedAndReset(String key) Return true when the value represented by the key has changed.keySet()voidvoidvoidObserve changes of a value represented by the key.intsize()toString()Collection<List<V>>values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
putSinglein interfaceMultivaluedMap<String,V>
-
add
- Specified by:
addin interfaceMultivaluedMap<String,V>
-
getFirst
- Specified by:
getFirstin interfaceMultivaluedMap<String,V>
-
addAll
- Specified by:
addAllin interfaceMultivaluedMap<String,V>
-
addAll
- Specified by:
addAllin interfaceMultivaluedMap<String,V>
-
addFirst
- Specified by:
addFirstin interfaceMultivaluedMap<String,V>
-
equalsIgnoreValueOrder
- Specified by:
equalsIgnoreValueOrderin interfaceMultivaluedMap<String,V>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,List<V>>
-
containsValue
- Specified by:
containsValuein 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
Setof 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()
-