org.eclipse.rdf4j.common.webapp.util

## Class HeaderElement

- java.lang.Object
- - org.eclipse.rdf4j.common.webapp.util.HeaderElement

-     public class HeaderElement
      extends Object

  An element in an HTTP header value. An HTTP header element has a value and zero or more parameters consisting of a key and a value. An example header element is `audio/*; q=0.2`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HeaderElement()`
    `HeaderElement(String value)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addParameter(Parameter param)`
    `void` | `addParameter(String key)`
    `void` | `addParameter(String key, String value)`
    `boolean` | `equals(Object obj)`
    `Parameter` | `getParameter(int i)`
    `Parameter` | `getParameter(String key)`
    `int` | `getParameterCount()`
    `List<Parameter>` | `getParameters()`
    `String` | `getParameterValue(String key)`
    `String` | `getValue()`
    `int` | `hashCode()`
    `static HeaderElement` | `parse(String encodedValue)`
    `Parameter` | `removeParameter(int idx)`
    `boolean` | `removeParameter(Parameter param)`
    `void` | `setValue(String value)`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### HeaderElement

          public HeaderElement()

    - #### HeaderElement

          public HeaderElement(String value)

  - ### Method Detail

    - #### parse

          public static HeaderElement parse(String encodedValue)

    - #### getValue

          public String getValue()

    - #### setValue

          public void setValue(String value)

    - #### getParameterCount

          public int getParameterCount()

    - #### getParameter

          public Parameter getParameter(int i)

    - #### getParameter

          public Parameter getParameter(String key)

    - #### getParameterValue

          public String getParameterValue(String key)

    - #### getParameters

          public List<Parameter> getParameters()

    - #### addParameter

          public void addParameter(String key)

    - #### addParameter

          public void addParameter(String key,
                                   String value)

    - #### addParameter

          public void addParameter(Parameter param)

    - #### removeParameter

          public Parameter removeParameter(int idx)

    - #### removeParameter

          public boolean removeParameter(Parameter param)

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.