public class BasicHeaderElement extends Object implements HeaderElement, Cloneable
HeaderElement
Constructor and Description |
---|
BasicHeaderElement(String name,
String value)
Constructor with name and value.
|
BasicHeaderElement(String name,
String value,
NameValuePair[] parameters)
Constructor with name, value and parameters.
|
Modifier and Type | Method and Description |
---|---|
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() |
public BasicHeaderElement(String name, String value, NameValuePair[] parameters)
name
- header element namevalue
- header element value. May be null
parameters
- header element parameters. May be null
.
Parameters are copied by reference, not by valuepublic String getName()
HeaderElement
getName
in interface HeaderElement
public String getValue()
HeaderElement
getValue
in interface HeaderElement
public NameValuePair[] getParameters()
HeaderElement
getParameters
in interface HeaderElement
public int getParameterCount()
HeaderElement
getParameterCount
in interface HeaderElement
public NameValuePair getParameter(int index)
HeaderElement
getParameter
in interface HeaderElement
index
- indexpublic NameValuePair getParameterByName(String name)
HeaderElement
getParameterByName
in interface HeaderElement
name
- parameter namepublic Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.