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
Constructor and Description |
---|
MetaInfo()
Default constructor.
|
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.String 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.String> map)
Adds the specified meta-information mapping.
|
void |
addMetaInfo(java.lang.String type,
java.lang.String value)
Adds meta-information as a pair of the specified information type and information value.
|
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.String> |
getMetaInfo()
Returns all the meta-information.
|
java.lang.String |
getMetaInfo(java.lang.Enum<?> type)
Returns meta-information of the specified type.
|
java.lang.String |
getMetaInfo(java.lang.String key)
Returns meta-information of the specified type.
|
int |
hashCode() |
boolean |
hasMetaInfo(java.lang.Enum<?> type)
Checks whether object contains meta-information of the specified predefined type.
|
boolean |
hasMetaInfo(java.lang.String type)
Checks whether object contains meta-information for the specified user-defined type.
|
void |
removeMetaInfo(java.lang.Enum<?> type)
Removes information of the specified type.
|
public boolean hasMetaInfo(java.lang.Enum<?> type)
java.lang.IllegalArgumentException
- when argument is null
.public boolean hasMetaInfo(java.lang.String type)
java.lang.IllegalArgumentException
- when argument is null
.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.String 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.String 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.String> map)
map
- Meta-information container mapping.java.lang.IllegalArgumentException
- when argument is null
.public void removeMetaInfo(java.lang.Enum<?> type)
type
- Meta-information type.java.lang.IllegalArgumentException
- when argument is null
.public java.lang.String getMetaInfo(java.lang.Enum<?> type)
type
- Meta-information type.null
otherwise.java.lang.IllegalArgumentException
- when argument is null
.public java.lang.String getMetaInfo(java.lang.String key)
key
- Meta-information key.null
otherwise.java.lang.IllegalArgumentException
- when argument is null
.public java.util.Map<java.lang.String,java.lang.String> getMetaInfo()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object