|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.sling.api.wrappers.ValueMapDecorator
public class ValueMapDecorator
ValueMapDecorator
decorates another Map
to provide a basic implementation for the additional methods
of a ValueMap
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from interface org.apache.sling.api.resource.ValueMap |
---|
EMPTY |
Constructor Summary | |
---|---|
ValueMapDecorator(java.util.Map<java.lang.String,java.lang.Object> base)
Creates a new wrapper around a given map. |
Method Summary | ||
---|---|---|
void |
clear()
|
|
boolean |
containsKey(java.lang.Object key)
|
|
boolean |
containsValue(java.lang.Object value)
|
|
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
entrySet()
|
|
java.lang.Object |
get(java.lang.Object key)
|
|
|
get(java.lang.String name,
java.lang.Class<T> type)
Get a named property and convert it into the given type. |
|
|
get(java.lang.String name,
T defaultValue)
Get a named property and convert it into the given type. |
|
boolean |
isEmpty()
|
|
java.util.Set<java.lang.String> |
keySet()
|
|
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
|
|
void |
putAll(java.util.Map<? extends java.lang.String,?> t)
|
|
java.lang.Object |
remove(java.lang.Object key)
|
|
int |
size()
|
|
java.util.Collection<java.lang.Object> |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public ValueMapDecorator(java.util.Map<java.lang.String,java.lang.Object> base)
base
- wrapped objectMethod Detail |
---|
public <T> T get(java.lang.String name, java.lang.Class<T> type)
get
in interface ValueMap
name
- The name of the propertytype
- The class of the type
null
if
non existing or can't be converted.public <T> T get(java.lang.String name, T defaultValue)
get
in interface ValueMap
name
- 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. If this is null
any existing propert is
not converted.
public int size()
size
in interface java.util.Map<java.lang.String,java.lang.Object>
public boolean isEmpty()
isEmpty
in interface java.util.Map<java.lang.String,java.lang.Object>
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<java.lang.String,java.lang.Object>
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.lang.Object put(java.lang.String key, java.lang.Object value)
put
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map<java.lang.String,java.lang.Object>
public void putAll(java.util.Map<? extends java.lang.String,?> t)
putAll
in interface java.util.Map<java.lang.String,java.lang.Object>
public void clear()
clear
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.util.Set<java.lang.String> keySet()
keySet
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.util.Collection<java.lang.Object> values()
values
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
entrySet
in interface java.util.Map<java.lang.String,java.lang.Object>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |