org.apache.commons.httpclient

Class NameValuePair

public class NameValuePair extends Object implements Serializable

A simple class encapsulating a name/value pair.

Version: $Revision: 480424 $ $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $

Author: B.C. Holmes Sean C. Sullivan Mike Bowler

Constructor Summary
NameValuePair()
Default constructor.
NameValuePair(String name, String value)
Constructor.
Method Summary
booleanequals(Object object)
StringgetName()
Return the name.
StringgetValue()
Return the current value.
inthashCode()
voidsetName(String name)
Set the name.
voidsetValue(String value)
Set the value.
StringtoString()
Get a String representation of this pair.

Constructor Detail

NameValuePair

public NameValuePair()
Default constructor.

NameValuePair

public NameValuePair(String name, String value)
Constructor.

Parameters: name The name. value The value.

Method Detail

equals

public boolean equals(Object object)

getName

public String getName()
Return the name.

Returns: String name The name

See Also: setName

getValue

public String getValue()
Return the current value.

Returns: String value The current value.

hashCode

public int hashCode()

setName

public void setName(String name)
Set the name.

Parameters: name The new name

See Also: getName

setValue

public void setValue(String value)
Set the value.

Parameters: value The new value.

toString

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

Returns: A string representation.

Copyright (c) 1999-2005 - Apache Software Foundation