org.apache.hc.core5.http.message

## Class BasicNameValuePair

- java.lang.Object
- - org.apache.hc.core5.http.message.BasicNameValuePair

- All Implemented Interfaces:
    Serializable, NameValuePair

      @Contract(threading=IMMUTABLE)
      public class BasicNameValuePair
      extends Object
      implements NameValuePair, Serializable

  Basic implementation of `NameValuePair`.
  Since:
    4.0
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicNameValuePair(String name, String value)` Default Constructor taking a name and a value.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `String` | `getName()` Gets the name of this pair.
    `String` | `getValue()` Gets the value of this pair.
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### BasicNameValuePair

          public BasicNameValuePair(String name,
                            String value)

      Default Constructor taking a name and a value. The value may be null.
      Parameters:
        `name` - The name.
        `value` - The value.

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `NameValuePair`
      Gets the name of this pair.
      Specified by:
        `getName` in interface `NameValuePair`
      Returns:
        the name of this pair, never `null`.

    - #### getValue

          public String getValue()

      Description copied from interface: `NameValuePair`
      Gets the value of this pair.
      Specified by:
        `getValue` in interface `NameValuePair`
      Returns:
        the value of this pair, may be `null`.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.