K - map key typeV - map value typeT - the mutator subtype, for method chainingpublic interface MapMutator<K,V,T extends MapMutator<K,V,T>>
Map instance while also supporting method chaining. The Map interface's
Map.put(Object, Object), Map.remove(Object), Map.putAll(Map), and Map.clear()
mutation methods do not support method chaining, so this interface enables that behavior.| Modifier and Type | Method and Description |
|---|---|
T |
add(K key,
V value)
Sets the specified key/value pair in the map, overwriting any existing entry with the same key.
|
T |
add(Map<? extends K,? extends V> m)
Sets the specified key/value pairs in the map, overwriting any existing entries with the same keys.
|
T |
delete(K key)
Removes the map entry with the specified key.
|
T |
empty()
Removes all entries from the map.
|
T delete(K key)
This method is the same as Map.remove, but instead returns the mutator instance for
method chaining.
key - the key for the map entry to remove.T empty()
This method is the same as Map.clear, but instead returns the mutator instance for
method chaining.
T add(K key, V value)
null or empty value will remove the entry from the map entirely.
This method is the same as Map.put, but instead returns the mutator instance for
method chaining.
key - the map keyvalue - the value to set for the specified header parameter nameT add(Map<? extends K,? extends V> m)
null or empty value, that pair will be removed from the map entirely.
This method is the same as Map.putAll, but instead returns the mutator instance for
method chaining.
m - the map to addCopyright © 2014–2023 jsonwebtoken.io. All rights reserved.