com.sun.faban.common
Class NameValuePair<V>

java.lang.Object
  extended by com.sun.faban.common.NameValuePair<V>
All Implemented Interfaces:
Serializable

public class NameValuePair<V>
extends Object
implements Serializable

Generic object representing a String name and an Object value.

Author:
Akara Sucharitakul
See Also:
Serialized Form

Field Summary
 String name
          The name part.
 V value
          The value part.
 
Constructor Summary
NameValuePair()
          Constructs an empty NameValuePair.
NameValuePair(String name, V value)
          Constructs a NameValuePair with a given name and value.
 
Method Summary
 boolean equals(Object o)
          A NameValuePair equals another if and only if both the name and value equal.
 int hashCode()
          Obtains the hash code of this NameValuePair.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public String name
The name part.


value

public V value
The value part.

Constructor Detail

NameValuePair

public NameValuePair(String name,
                     V value)
Constructs a NameValuePair with a given name and value.

Parameters:
name - The name
value - The value

NameValuePair

public NameValuePair()
Constructs an empty NameValuePair.

Method Detail

equals

public boolean equals(Object o)
A NameValuePair equals another if and only if both the name and value equal.

Overrides:
equals in class Object
Parameters:
o - The other NameValuePair
Returns:
True if the o equals this object, false otherwise

hashCode

public int hashCode()
Obtains the hash code of this NameValuePair.

Overrides:
hashCode in class Object
Returns:
The hash code