public class DeepReadValueMapDecorator extends ValueMapDecorator
Constructor and Description |
---|
DeepReadValueMapDecorator(Resource resource,
ValueMap base) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.Object key) |
java.lang.Object |
get(java.lang.Object key) |
<T> T |
get(@NotNull java.lang.String name,
@NotNull java.lang.Class<T> type)
Get a named property and convert it into the given type.
|
<T> T |
get(@NotNull java.lang.String name,
T defaultValue)
Get a named property and convert it into the given type.
|
clear, containsValue, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
public <T> T get(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.Class<T> type)
ValueMapDecorator
null
in this
case.get
in interface ValueMap
get
in class ValueMapDecorator
T
- The class of the typename
- The name of the propertytype
- The class of the typenull
if
non existing or can't be converted.ValueMap.get(java.lang.String, java.lang.Class)
@NotNull public <T> T get(@NotNull @NotNull java.lang.String name, @NotNull T defaultValue)
ValueMapDecorator
null
.
Therefore all implementations should internally call Map.get(Object)
when the 2nd parameter
has value null
.get
in interface ValueMap
get
in class ValueMapDecorator
T
- 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)
.ValueMap.get(java.lang.String, java.lang.Object)
public boolean containsKey(java.lang.Object key)
ValueMapDecorator
containsKey
in interface java.util.Map<java.lang.String,java.lang.Object>
containsKey
in class ValueMapDecorator
ValueMapDecorator.containsKey(java.lang.Object)
public java.lang.Object get(java.lang.Object key)
ValueMapDecorator
get
in interface java.util.Map<java.lang.String,java.lang.Object>
get
in class ValueMapDecorator
ValueMapDecorator.get(java.lang.Object)
Copyright © 2022 The Apache Software Foundation. All rights reserved.