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.http.message
Class BasicHeaderElement

    java.lang.Object
      org.apache.http.message.BasicHeaderElement

All Implemented Interfaces:
  Cloneable, HeaderElement

    public class BasicHeaderElement

extends Object
implements HeaderElement, Cloneable

Basic implementation of `HeaderElement`

Since:
  4.0

Constructor Summary
`BasicHeaderElement(String name, String value)` Constructor with name and value.
`BasicHeaderElement(String name, String value, NameValuePair[] parameters)` Constructor with name, value and parameters.

Method Summary
`Object` | `clone()`
`boolean` | `equals(Object object)`
`String` | `getName()` Returns header element name.
`NameValuePair` | `getParameter(int index)` Returns parameter with the given index.
`NameValuePair` | `getParameterByName(String name)` Returns the first parameter with the given name.
`int` | `getParameterCount()` Returns the total count of parameters.
`NameValuePair[]` | `getParameters()` Returns an array of name / value pairs.
`String` | `getValue()` Returns header element value.
`int` | `hashCode()`
`String` | `toString()`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BasicHeaderElement

    public BasicHeaderElement(String name,
                              String value,
                              NameValuePair[] parameters)

  Constructor with name, value and parameters.

  Parameters:
    `name` - header element name
    `value` - header element value. May be `null`
    `parameters` - header element parameters. May be `null`. Parameters are copied by reference, not by value

### BasicHeaderElement

    public BasicHeaderElement(String name,
                              String value)

  Constructor with name and value.

  Parameters:
    `name` - header element name
    `value` - header element value. May be `null`

Method Detail

### getName

    public String getName()

  Description copied from interface: `HeaderElement`
  Returns header element name.

  Specified by:
    `getName` in interface `HeaderElement`
  Returns:
    header element name

### getValue

    public String getValue()

  Description copied from interface: `HeaderElement`
  Returns header element value.

  Specified by:
    `getValue` in interface `HeaderElement`
  Returns:
    header element value

### getParameters

    public NameValuePair[] getParameters()

  Description copied from interface: `HeaderElement`
  Returns an array of name / value pairs.

  Specified by:
    `getParameters` in interface `HeaderElement`
  Returns:
    array of name / value pairs

### getParameterCount

    public int getParameterCount()

  Description copied from interface: `HeaderElement`
  Returns the total count of parameters.

  Specified by:
    `getParameterCount` in interface `HeaderElement`
  Returns:
    parameter count

### getParameter

    public NameValuePair getParameter(int index)

  Description copied from interface: `HeaderElement`
  Returns parameter with the given index.

  Specified by:
    `getParameter` in interface `HeaderElement`
  Parameters:
    `index` - index
  Returns:
    name / value pair

### getParameterByName

    public NameValuePair getParameterByName(String name)

  Description copied from interface: `HeaderElement`
  Returns the first parameter with the given name.

  Specified by:
    `getParameterByName` in interface `HeaderElement`
  Parameters:
    `name` - parameter name
  Returns:
    name / value pair

### equals

    public boolean equals(Object object)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### clone

    public Object clone()
                 throws CloneNotSupportedException

  Overrides:
    `clone` in class `Object`
  Throws:
    `CloneNotSupportedException`

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 © 2005–2021 The Apache Software Foundation. All rights reserved.