bill.util
Class KeyValue
java.lang.Object
|
+--bill.util.KeyValue
- public class KeyValue
- extends Object
This is a generic class that holds and provides access to two data elements,
a key and its associated a value. Itis purpose is to standardize the use
of simple key/value objects.
Constructor Summary |
KeyValue()
Create an empty KeyValue instance. |
KeyValue(Object key,
Object value)
Create an empty KeyValue instance using the specified key and value
pair. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KeyValue
public KeyValue()
- Create an empty KeyValue instance. To set the key and the value you
will have to call the appropriate setter methods.
KeyValue
public KeyValue(Object key,
Object value)
- Create an empty KeyValue instance using the specified key and value
pair.
- Parameters:
key
- The value to set the key equal to.value
- The value to set the value equal to.
setKey
public void setKey(Object key)
- Sets the object's key to the specified value.
- Parameters:
key
- The value to set the key equal to.
setValue
public void setValue(Object value)
- Sets the object's value to the specified value.
- Parameters:
value
- The value to set the value equal to.
getKey
public Object getKey()
- Gets the object's key value.
- Returns:
- The value the key is set to.
getValue
public Object getValue()
- Gets the object's value value.
- Returns:
- The value the value is set to.