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
-
-
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.Object
clone()
boolean
equals(java.lang.Object object)
java.lang.String
getName()
Gets the name of this pair.java.lang.String
getValue()
Gets the value of this pair.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:NameValuePair
Gets the name of this pair.- Specified by:
getName
in interfaceNameValuePair
- Returns:
- the name of this pair, never
null
.
-
getValue
public java.lang.String getValue()
Description copied from interface:NameValuePair
Gets the value of this pair.- Specified by:
getValue
in interfaceNameValuePair
- Returns:
- the value of this pair, may be
null
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
-