public class MetaData extends Object implements Map<String,Object>, Serializable
| Constructor and Description |
|---|
MetaData(Map<String,?> items)
Initializes a MetaData instance with the given
items as content. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
This operation is not supported.
|
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
static MetaData |
emptyInstance()
Returns an empty MetaData instance.
|
Set<Map.Entry<String,Object>> |
entrySet() |
boolean |
equals(Object o) |
static MetaData |
from(Map<String,?> metaDataEntries)
Creates a new MetaData instance from the given
metaDataEntries. |
Object |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Set<String> |
keySet() |
MetaData |
mergedWith(Map<String,?> additionalEntries)
Returns a MetaData instance containing values of
this, combined with the given
additionalEntries. |
Object |
put(String key,
Object value)
This operation is not supported.
|
void |
putAll(Map<? extends String,?> m)
This operation is not supported.
|
protected Object |
readResolve()
Java Serialization specification method that will ensure that deserialization will maintain a single instance of
empty MetaData.
|
Object |
remove(Object key)
This operation is not supported.
|
int |
size() |
Collection<Object> |
values() |
MetaData |
withoutKeys(Set<String> keys)
Returns a MetaData instance with the items with given
keys removed. |
public MetaData(Map<String,?> items)
items as content. Note that the items are copied
into the MetaData. Modifications in the Map of items will not reflect is the MetaData, or vice versa.
Modifications in the items themselves are reflected in the MetaData.items - the items to populate the MetaData withpublic static MetaData emptyInstance()
public static MetaData from(Map<String,?> metaDataEntries)
metaDataEntries. If metaDataEntries is
already a MetaData instance, it is returned as is. This makes this method more suitable than the MetaData(java.util.Map) copy-constructor.metaDataEntries - the items to populate the MetaData withmetaDataEntries as contentpublic void clear()
public boolean containsKey(Object key)
containsKey in interface Map<String,Object>public boolean containsValue(Object value)
containsValue in interface Map<String,Object>public boolean equals(Object o)
public int hashCode()
public MetaData mergedWith(Map<String,?> additionalEntries)
this, combined with the given
additionalEntries. If any entries have identical keys, the values from the
additionalEntries will take precedence.additionalEntries - The additional entries for the new MetaDatathis, combined with the given
additionalEntriespublic MetaData withoutKeys(Set<String> keys)
keys removed. Keys for which there is no
assigned value are ignored.keys - The keys of the entries to removekeysprotected Object readResolve()
Copyright © 2010-2014. All Rights Reserved.