Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.httpclient
Class NameValuePair

    java.lang.Object
      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: 480424 $ $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $
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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.