net.sourceforge.hiveutils.collections
Class NameValuePair

java.lang.Object
  extended by net.sourceforge.hiveutils.collections.NameValuePair

public class NameValuePair
extends java.lang.Object

Utility class to hold a "name-value" pair. Convenient for property handling.

Author:
Jean-Francois Poilpret

Constructor Summary
NameValuePair()
          Constructs a default name-value pair.
NameValuePair(java.lang.String name, java.lang.String value)
          Constructs a name-value pair with the given name and value.
 
Method Summary
 java.lang.String getName()
          Gets the name of this name-value pair.
 java.lang.String getValue()
          Gets the value of this name-value pair.
 void setName(java.lang.String name)
          Sets a name to this name-value pair.
 void setValue(java.lang.String value)
          Sets a value to this name-value pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameValuePair

public NameValuePair()
Constructs a default name-value pair. Name and Value should be filled in later by setter methods.


NameValuePair

public NameValuePair(java.lang.String name,
                     java.lang.String value)
Constructs a name-value pair with the given name and value.

Parameters:
name - name of the pair
value - value of the pair
Method Detail

setName

public void setName(java.lang.String name)
Sets a name to this name-value pair.

Parameters:
name - new name of the pair

getName

public java.lang.String getName()
Gets the name of this name-value pair.

Returns:
name of the pair

setValue

public void setValue(java.lang.String value)
Sets a value to this name-value pair.

Parameters:
value - new value of the pair

getValue

public java.lang.String getValue()
Gets the value of this name-value pair.

Returns:
value of the pair