Package com.adaptris.core
Class MetadataElement
- java.lang.Object
-
- com.adaptris.core.MetadataElement
-
- All Implemented Interfaces:
NameValuePair
,java.io.Serializable
,java.lang.Cloneable
public class MetadataElement extends java.lang.Object implements NameValuePair, java.lang.Cloneable
A key-value pair of
String
metadata. Instances of this class are used by implementations ofAdaptrisMessage
to store metadata. Semantic equality ofMetadataElement
s is based on the value of the 'key' only.- See Also:
- Serialized Form
In the adapter configuration file this class is aliased as metadata-element which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description MetadataElement()
Default Constructor.MetadataElement(KeyValuePair kp)
MetadataElement(java.lang.String key, java.lang.String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
boolean
equals(java.lang.Object obj)
java.lang.String
getKey()
java.lang.String
getValue()
int
hashCode()
void
setKey(java.lang.String key)
void
setValue(java.lang.String value)
java.lang.String
toString()
-
-
-
Constructor Detail
-
MetadataElement
public MetadataElement()
Default Constructor.By default, each metadata element is given a unique key using
GuidGenerator.getUUID()
.
-
MetadataElement
public MetadataElement(KeyValuePair kp)
-
MetadataElement
public MetadataElement(java.lang.String key, java.lang.String value)
-
-
Method Detail
-
setKey
public void setKey(java.lang.String key)
- Specified by:
setKey
in interfaceNameValuePair
-
getKey
public java.lang.String getKey()
- Specified by:
getKey
in interfaceNameValuePair
-
setValue
public void setValue(java.lang.String value)
- Specified by:
setValue
in interfaceNameValuePair
-
getValue
public java.lang.String getValue()
- Specified by:
getValue
in interfaceNameValuePair
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
- See Also:
Object.clone()
-
-