br.pucrio.inf.les.bdijade.util
Class MetadataElement
java.lang.Object
br.pucrio.inf.les.bdijade.util.MetadataElement
- Direct Known Subclasses:
- Belief, Plan
public abstract class MetadataElement
- extends java.lang.Object
- Author:
- ingrid
|
Field Summary |
protected java.util.Map<java.lang.String,java.lang.Object> |
metadata
|
|
Method Summary |
java.util.Map<java.lang.String,java.lang.Object> |
getMetadata()
|
java.lang.Object |
getMetadata(java.lang.String name)
Gets a value of a metadata. |
boolean |
hasMetadata(java.lang.String name)
Verifies if a metadata is associated with this element. |
void |
putMetadata(java.lang.String name,
java.lang.Object value)
Put a metadata in this element. |
java.lang.Object |
removeMetadata(java.lang.String name)
Removes a metadata of this element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
metadata
protected java.util.Map<java.lang.String,java.lang.Object> metadata
MetadataElement
public MetadataElement()
getMetadata
public java.util.Map<java.lang.String,java.lang.Object> getMetadata()
- Returns:
- the metadata
getMetadata
public java.lang.Object getMetadata(java.lang.String name)
- Gets a value of a metadata.
- Parameters:
name - the name of the metadata.
- Returns:
- the existing value of this metadata.
hasMetadata
public boolean hasMetadata(java.lang.String name)
- Verifies if a metadata is associated with this element.
- Parameters:
name - the name of the metadata.
- Returns:
- true if the element has this metadata.
putMetadata
public void putMetadata(java.lang.String name,
java.lang.Object value)
- Put a metadata in this element. If it does not exists, it is added, and it
is update otherwise.
- Parameters:
name - the name of the metadata.value - the value associated with this metadata.
removeMetadata
public java.lang.Object removeMetadata(java.lang.String name)
- Removes a metadata of this element.
- Parameters:
name - the name of the metadata.
- Returns:
- the existing value of this metadata.