Package com.adaptris.util
Class KeyValuePair
- java.lang.Object
-
- com.adaptris.util.KeyValuePair
-
- All Implemented Interfaces:
NameValuePair
,java.io.Serializable
public class KeyValuePair extends java.lang.Object implements NameValuePair
A key value pair.Primarily used in configuration to avoid the use of maps.
- See Also:
- Serialized Form
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 Summary
Constructors Constructor Description KeyValuePair()
KeyValuePair(java.lang.String key, java.lang.String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Method Detail
-
setKey
public void setKey(java.lang.String key)
Sets the 'key'.
- Specified by:
setKey
in interfaceNameValuePair
- Parameters:
key
- may not be null.
-
getKey
public java.lang.String getKey()
- Specified by:
getKey
in interfaceNameValuePair
-
setValue
public void setValue(java.lang.String value)
Sets the 'value'.
- Specified by:
setValue
in interfaceNameValuePair
- Parameters:
value
- may not be null
-
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)
KeyValuePair
s are semantically equally if their keys only are equal.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- theObject
to test- Returns:
- true if
obj
is semantically equal
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-