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 booleanequals(java.lang.Object obj)KeyValuePairs are semantically equally if their keys only are equal.java.lang.StringgetKey()java.lang.StringgetValue()inthashCode()voidsetKey(java.lang.String key)Sets the 'key'.voidsetValue(java.lang.String value)Sets the 'value'.java.lang.StringtoString()
-
-
-
Method Detail
-
setKey
public void setKey(java.lang.String key)
Sets the 'key'.
- Specified by:
setKeyin interfaceNameValuePair- Parameters:
key- may not be null.
-
getKey
public java.lang.String getKey()
- Specified by:
getKeyin interfaceNameValuePair
-
setValue
public void setValue(java.lang.String value)
Sets the 'value'.
- Specified by:
setValuein interfaceNameValuePair- Parameters:
value- may not be null
-
getValue
public java.lang.String getValue()
- Specified by:
getValuein interfaceNameValuePair
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
KeyValuePairs are semantically equally if their keys only are equal.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- theObjectto test- Returns:
- true if
objis semantically equal
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-