public class KeyValuePair extends java.lang.Object implements NameValuePair
Primarily used in configuration to avoid the use of maps.
In the adapter configuration file this class is aliased as key-value-pair which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
KeyValuePair() |
KeyValuePair(java.lang.String key,
java.lang.String value) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
KeyValuePair s are semantically equally if their
keys only are equal. |
java.lang.String |
getKey() |
java.lang.String |
getValue() |
int |
hashCode() |
void |
setKey(java.lang.String key)
Sets the 'key'.
|
void |
setValue(java.lang.String value)
Sets the 'value'.
|
java.lang.String |
toString() |
public KeyValuePair()
public KeyValuePair(java.lang.String key, java.lang.String value)
public void setKey(java.lang.String key)
Sets the 'key'.
setKey
in interface NameValuePair
key
- may not be null.public java.lang.String getKey()
getKey
in interface NameValuePair
public void setValue(java.lang.String value)
Sets the 'value'.
setValue
in interface NameValuePair
value
- may not be nullpublic java.lang.String getValue()
getValue
in interface NameValuePair
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
KeyValuePair
s are semantically equally if their
keys only are equal.
equals
in class java.lang.Object
obj
- the Object
to testobj
is semantically equalpublic int hashCode()
hashCode
in class java.lang.Object