org.apache.commons.httpclient
Class NameValuePair

java.lang.Object
  extended by org.apache.commons.httpclient.NameValuePair
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Cookie, Header, HeaderElement

public class NameValuePair
extends Object
implements Serializable

A simple class encapsulating a name/value pair.

Version:
$Revision: 157457 $ $Date: 2005-03-14 21:23:16 +0100 (Mo, 14 Mrz 2005) $
Author:
B.C. Holmes, Sean C. Sullivan, Mike Bowler
See Also:
Serialized Form

Constructor Summary
NameValuePair()
          Default constructor.
NameValuePair(String name, String value)
          Constructor.
 
Method Summary
 boolean equals(Object object)
          
 String getName()
          Return the name.
 String getValue()
          Return the current value.
 int hashCode()
          
 void setName(String name)
          Set the name.
 void setValue(String value)
          Set the value.
 String toString()
          Get a String representation of this pair.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameValuePair

public NameValuePair()
Default constructor.


NameValuePair

public NameValuePair(String name,
                     String value)
Constructor.

Parameters:
name - The name.
value - The value.
Method Detail

setName

public void setName(String name)
Set the name.

Parameters:
name - The new name
See Also:
getName()

getName

public String getName()
Return the name.

Returns:
String name The name
See Also:
setName(String)

setValue

public void setValue(String value)
Set the value.

Parameters:
value - The new value.

getValue

public String getValue()
Return the current value.

Returns:
String value The current value.

toString

public String toString()
Get a String representation of this pair.

Overrides:
toString in class Object
Returns:
A string representation.

equals

public boolean equals(Object object)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object


Copyright (c) 1999-2005 - Apache Software Foundation