NameValuePair (HttpClient Library (Version 3.1))
Date: 2019-09-02

org.apache.commons.httpclient

## Class NameValuePair

- java.lang.Object
- - org.apache.commons.httpclient.NameValuePair

- All Implemented Interfaces:
    java.io.Serializable
  Direct Known Subclasses:
    Cookie, Header, HeaderElement

      public class NameValuePair
      extends java.lang.Object
      implements java.io.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

    Constructors
    Constructor and Description
    `NameValuePair()` Default constructor.
    `NameValuePair(java.lang.String name, java.lang.String value)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object object)`
    `java.lang.String` | `getName()` Return the name.
    `java.lang.String` | `getValue()` Return the current value.
    `int` | `hashCode()`
    `void` | `setName(java.lang.String name)` Set the name.
    `void` | `setValue(java.lang.String value)` Set the value.
    `java.lang.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(java.lang.String name,
                               java.lang.String value)

      Constructor.
      Parameters:
        `name` - The name.
        `value` - The value.

  - ### Method Detail

    - #### setName

          public void setName(java.lang.String name)

      Set the name.
      Parameters:
        `name` - The new name
      See Also:
        `getName()`

    - #### getName

          public java.lang.String getName()

      Return the name.
      Returns:
        String name The name
      See Also:
        `setName(String)`

    - #### setValue

          public void setValue(java.lang.String value)

      Set the value.
      Parameters:
        `value` - The new value.

    - #### getValue

          public java.lang.String getValue()

      Return the current value.
      Returns:
        String value The current value.

    - #### toString

          public java.lang.String toString()

      Get a String representation of this pair.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        A string representation.

    - #### equals

          public boolean equals(java.lang.Object object)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

Copyright (c) 1999-2005 - Apache Software Foundation