Interface IMetaData
- All Known Implementing Classes:
Sample
public interface IMetaData
Store additional data and information associated with an object.
-
Method Summary
Modifier and Type Method Description java.lang.Object
getData()
Get meta data stored with the object.java.lang.Object
getData(java.lang.String key)
Returns the value to which the specified key is mapped, ornull
if this map contains no mapping for the key.java.util.Map<java.lang.String,java.lang.Object>
getDataCollection()
Get the available meta data entries as a immutable#Map
.void
setData(java.lang.Object data)
Store meta data with the object.void
setData(java.lang.String key, java.lang.Object data)
Store meta data mapped with the key.
-
Method Details
-
getData
java.lang.Object getData()Get meta data stored with the object.- Returns:
- containing meta data or
null
-
setData
void setData(java.lang.Object data)Store meta data with the object.- Parameters:
data
- data to be stored with the object
-
getData
java.lang.Object getData(java.lang.String key)Returns the value to which the specified key is mapped, ornull
if this map contains no mapping for the key.- Parameters:
key
- key associated with the data- Returns:
- associated meta data or
null
- Throws:
java.lang.IllegalArgumentException
-- if the key is null
-
setData
void setData(java.lang.String key, java.lang.Object data)Store meta data mapped with the key. To remove an existing entry, set the data tonull
.- Parameters:
key
- key to be associated with the data ornull
to removedata
- data to be stored with the object- Throws:
java.lang.IllegalArgumentException
-- if the key is null
-
getDataCollection
java.util.Map<java.lang.String,java.lang.Object> getDataCollection()Get the available meta data entries as a immutable#Map
.- Returns:
- immutable map of the stored data
-