public class BulkEditValueMap extends java.lang.Object implements ValueMap
Please not that the merge is actually "virtual" since under the hood the
ValueMap will always be empty. In other words, get(Object key)
performs an on-demand merge for the passed key.
In addition to providing the actual (merged) value for a given key, this
specific ValueMap can also tell if a given key has a mixed value using
#get(key + Field.IS_MIXED_SUFFIX)
.
Constructor and Description |
---|
BulkEditValueMap(java.util.List<Resource> resources) |
Modifier and Type | Method and Description |
---|---|
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)
Retrieves the merged value for the passed key.
|
<T> T |
get(java.lang.String name,
java.lang.Class<T> type)
Get a named property and convert it into the given type.
|
<T> T |
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,? extends java.lang.Object> t) |
java.lang.Object |
remove(java.lang.Object key) |
int |
size() |
java.util.Collection<java.lang.Object> |
values() |
public BulkEditValueMap(@Nonnull java.util.List<Resource> resources)
public java.lang.Object get(java.lang.Object key)
#get(key +
Field.IS_MIXED_SUFFIX)
returns true
if the value is mixed;
false
otherwise. If the value is non-existent null
is
returned.get
in interface java.util.Map<java.lang.String,java.lang.Object>
key
- The key of the value to retrieve.Field.IS_MIXED_SUFFIX
).public <T> T get(@Nonnull java.lang.String name, @Nonnull java.lang.Class<T> type)
ValueMap
null
in this
case.@Nonnull public <T> T get(@Nonnull java.lang.String name, @Nonnull T defaultValue)
ValueMap
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 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.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>
public void clear()
clear
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 void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> t)
putAll
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>
Copyright © 2010 - 2020 Adobe. All Rights Reserved