public class MetaInfo
extends java.lang.Object
This object stores some meta-information. Meta-information is presented in pairs
like (MetaInfoType
key, MetaInfoValue
value).
MetaInfoType
,
MetaInfoValue
Modifier | Constructor and Description |
---|---|
protected |
MetaInfo()
Default constructor.
|
protected |
MetaInfo(java.util.Map<java.lang.String,java.lang.Object> metaMap)
Constructs an object with the specified data.
|
Modifier and Type | Method and Description |
---|---|
void |
addMetaInfo(java.lang.Enum<?> type,
java.lang.Enum<?> value)
Adds meta-information as a pair of the specified information type and information value.
|
void |
addMetaInfo(java.lang.Enum<?> type,
java.lang.Object value)
Adds meta-information as a pair of the specified information type and information value.
|
void |
addMetaInfo(java.util.Map<java.lang.String,java.lang.Object> map)
Add all the meta-information that is stored in the specified mapping.
|
void |
addMetaInfo(java.lang.String type,
java.lang.Object value)
Adds meta-information as a pair of the specified information type and information value.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAllMetaInfo()
Returns all the meta-information that is stored in this object.
|
java.lang.Object |
getMetaInfo(java.lang.Enum<?> key)
Returns meta-information for the specified key.
|
java.lang.Object |
getMetaInfo(java.lang.String key)
Returns meta-information of the specified type.
|
java.lang.String |
getStringMetaInfo(java.lang.Enum<?> key)
Returns the string representation of the data is stored with the specified key.
|
java.lang.String |
getStringMetaInfo(java.lang.String key)
Returns the string representation of the data is stored with the specified key.
|
boolean |
hasMetaInfo(java.lang.Enum<?> key)
Checks whether object contains meta-information for the specified enum key.
|
boolean |
hasMetaInfo(java.lang.String key)
Checks whether object contains meta-information for the specified user-defined type.
|
protected MetaInfo()
protected MetaInfo(java.util.Map<java.lang.String,java.lang.Object> metaMap)
metaMap
- The meta-information data map.public boolean hasMetaInfo(java.lang.String key)
key
- The meta-information key.true
when the object contains meta-information for the specified key,
false
otherwise.java.lang.IllegalArgumentException
- when argument is null
.public boolean hasMetaInfo(java.lang.Enum<?> key)
key
- The meta-information key.true
when the object contains meta-information for the specified key,
false
otherwise.public void addMetaInfo(java.lang.Enum<?> type, java.lang.Enum<?> value)
It is supposed that this method is used for the predefined types and values.
type
- Meta-information type.value
- Meta-information value.java.lang.IllegalArgumentException
- when any of the arguments is null
.public void addMetaInfo(java.lang.Enum<?> type, java.lang.Object value)
It is supposed that this method is used for the predefined types.
type
- Meta-information type.value
- Meta-information value.java.lang.IllegalArgumentException
- when any of the arguments is null
.public void addMetaInfo(java.lang.String type, java.lang.Object value)
type
- Meta-information type.value
- Meta-information value.java.lang.IllegalArgumentException
- when any of the arguments is null
.public void addMetaInfo(java.util.Map<java.lang.String,java.lang.Object> map)
map
- The meta-information that is to be added into this object's storage.java.lang.IllegalArgumentException
- when argument is null
.public java.lang.Object getMetaInfo(java.lang.String key)
key
- Meta-information key.null
otherwise.java.lang.IllegalArgumentException
- when argument is null
.public java.lang.Object getMetaInfo(java.lang.Enum<?> key)
key
- The meta-information key.public java.lang.String getStringMetaInfo(java.lang.String key)
key
- The data key.public java.lang.String getStringMetaInfo(java.lang.Enum<?> key)
key
- The data key.public java.util.Map<java.lang.String,java.lang.Object> getAllMetaInfo()