public class ValueMapDecorator extends Object implements ValueMap
Constructor and Description |
---|
ValueMapDecorator(Map<String,Object> base)
Creates a new wrapper around a given map.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
boolean |
equals(Object obj) |
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.
|
int |
hashCode() |
boolean |
isEmpty() |
Set<String> |
keySet() |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,?> t) |
Object |
remove(Object key) |
int |
size() |
String |
toString() |
Collection<Object> |
values() |
public <T> T get(String name, Class<T> type)
null
in this
case.public <T> T get(String name, T defaultValue)
null
.
Therefore all implementations should internally call Map.get(Object)
when the 2nd parameter
has value null
.get
in interface ValueMap
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)
.public boolean containsKey(Object key)
containsKey
in interface Map<String,Object>
public boolean containsValue(Object value)
containsValue
in interface Map<String,Object>
public int hashCode()
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.