Expresso 5-6

com.jcorporate.expresso.kernel.util
Class NameValuePair

java.lang.Object
  extended bycom.jcorporate.expresso.kernel.util.NameValuePair

public class NameValuePair
extends Object

Object similar to valid values, but it mainly represents the common usage of a name representing a value.

Version:
$Revision: 1.4 $ on $Date: 2004/11/17 20:48:17 $
Author:
Michael Rimov

Constructor Summary
NameValuePair()
          Constructor that creates a null name and null value.
NameValuePair(String newName, Object newValue)
          Constructs a name value pair with the given name and given object value.
 
Method Summary
 String getName()
          Retrieve the name for this name value pair
 Object getValue()
          Get the actual value object
 int hashCode()
          Override on hash code.
 void setName(String name)
          Set the name for this pair
 void setValue(Object value)
          Set the value for the name value pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameValuePair

public NameValuePair()
Constructor that creates a null name and null value.


NameValuePair

public NameValuePair(String newName,
                     Object newValue)
Constructs a name value pair with the given name and given object value.

Parameters:
newName - the name of the name value pair
newValue - the object or value part of the pair
Method Detail

getName

public String getName()
Retrieve the name for this name value pair

Returns:
java.lang.String [may be null]

setName

public void setName(String name)
Set the name for this pair

Parameters:
name - java.lang.String

setValue

public void setValue(Object value)
Set the value for the name value pair

Parameters:
value - java.lang.Object

getValue

public Object getValue()
Get the actual value object

Returns:
java.lang.Object

hashCode

public int hashCode()
Override on hash code. WE only care to hash code based upon the name, not the value.

Returns:
integer hash code.

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.