public class MergedValueMap extends Object implements ValueMap
It is optimized for the forms module, ie. on calls to
get(String, Class) with String[] as type (see
FormsHelper.getValues(org.apache.sling.api.SlingHttpServletRequest, Resource)
).
Note: this class is not synchronized, ie. not thread-safe.
| Constructor and Description |
|---|
MergedValueMap(List<Resource> resources) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key) |
<T> T |
get(String name,
Class<T> type)
Get a named property and convert it into the given type.
|
<T> T |
get(String name,
T defaultValue)
Get a named property and convert it into the given type.
|
boolean |
isEmpty() |
Set<String> |
keySet() |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,? extends Object> t) |
Object |
remove(Object key) |
int |
size() |
Collection<Object> |
values() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic <T> T get(String name, Class<T> type)
ValueMapnull in this
case.public <T> T get(String name, T defaultValue)
ValueMapnull.
Therefore all implementations should internally call Map.get(Object) when the 2nd parameter
has value null.get in interface ValueMapT - The expected typename - The name of the propertydefaultValue - The default value to use if the named property does
not exist or cannot be converted to the requested type. The
default value is also used to define the type to convert the
value to. Must not be null. If you want to return null by default
rather rely on ValueMap.get(String, Class).public boolean containsKey(Object key)
containsKey in interface Map<String,Object>public boolean containsValue(Object value)
containsValue in interface Map<String,Object>Copyright © 2010 - 2020 Adobe. All Rights Reserved