Package org.apache.http.message
Class BasicNameValuePair
- java.lang.Object
-
- org.apache.http.message.BasicNameValuePair
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,NameValuePair
@Contract(threading=IMMUTABLE) public class BasicNameValuePair extends java.lang.Object implements NameValuePair, java.lang.Cloneable, java.io.Serializable
Basic implementation ofNameValuePair.- Since:
- 4.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringnameprivate static longserialVersionUIDprivate java.lang.Stringvalue
-
Constructor Summary
Constructors Constructor Description BasicNameValuePair(java.lang.String name, java.lang.String value)Default Constructor taking a name and a value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()booleanequals(java.lang.Object object)java.lang.StringgetName()Gets the name of this pair.java.lang.StringgetValue()Gets the value of this pair.inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
name
private final java.lang.String name
-
value
private final java.lang.String value
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:NameValuePairGets the name of this pair.- Specified by:
getNamein interfaceNameValuePair- Returns:
- the name of this pair, never
null.
-
getValue
public java.lang.String getValue()
Description copied from interface:NameValuePairGets the value of this pair.- Specified by:
getValuein interfaceNameValuePair- Returns:
- the value of this pair, may be
null.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
-