com.ge.research.utils
Class NameValuePair

java.lang.Object
  extended bycom.ge.research.utils.NameValuePair

public final class NameValuePair
extends java.lang.Object

Encapsulates the information about a relationship between a String literal "key" and the value associated with that String literal key. The concept is the same as that of the Map, except that it is restricted to a single name/value pair. This relationship allows both a null key as well as a null value.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:39 $
Author:
garbiras
Created on:
Mar 31, 2005

Constructor Summary
NameValuePair(java.lang.String key, java.lang.Object value)
          Default constructor.
 
Method Summary
 java.lang.String getKey()
          Returns the key (or name) parameter of the relationship
 java.lang.Object getValue()
          Returns the value parameter of the relationship
 void setKey(java.lang.String key)
          Sets the key (or name) parameter of the relationship
 void setValue(java.lang.Object value)
          Sets the value parameter of the relationship
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameValuePair

public NameValuePair(java.lang.String key,
                     java.lang.Object value)
Default constructor. Sets the key and value attributes.

Parameters:
key - the name of the key (or name) parameter of the relationship
value - the value parameter of the relationship
See Also:
setKey(java.lang.String), setValue(java.lang.Object)
Method Detail

getKey

public final java.lang.String getKey()
Returns the key (or name) parameter of the relationship

Returns:
The key (or name) parameter of the relationship.

getValue

public final java.lang.Object getValue()
Returns the value parameter of the relationship

Returns:
The value parameter of the relationship.

setKey

public final void setKey(java.lang.String key)
Sets the key (or name) parameter of the relationship

Parameters:
key - the key (or name) parameter of the relationship

setValue

public final void setValue(java.lang.Object value)
Sets the value parameter of the relationship

Parameters:
value - the value parameter of the relationship