com.gargoylesoftware.htmlunit.util
Class NameValuePair

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.util.NameValuePair
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
KeyDataPair

public class NameValuePair
extends Object
implements Serializable

A name/value pair.

Version:
$Revision: 5724 $
Author:
Daniel Gredler, Nicolas Belisle
See Also:
Serialized Form

Constructor Summary
NameValuePair(String name, String value)
          Creates a new instance.
 
Method Summary
 boolean equals(Object object)
          
 String getName()
          Returns the name.
 String getValue()
          Returns the value.
 int hashCode()
          
static org.apache.http.NameValuePair[] toHttpClient(List<NameValuePair> pairs)
          Converts the specified name/value pairs into HttpClient name/value pairs.
static org.apache.http.NameValuePair[] toHttpClient(NameValuePair[] pairs)
          Converts the specified name/value pairs into HttpClient name/value pairs.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameValuePair

public NameValuePair(String name,
                     String value)
Creates a new instance.

Parameters:
name - the name
value - the value
Method Detail

getName

public String getName()
Returns the name.

Returns:
the name

getValue

public String getValue()
Returns the value.

Returns:
the value

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

toHttpClient

public static org.apache.http.NameValuePair[] toHttpClient(NameValuePair[] pairs)
Converts the specified name/value pairs into HttpClient name/value pairs.

Parameters:
pairs - the name/value pairs to convert
Returns:
the converted name/value pairs

toHttpClient

public static org.apache.http.NameValuePair[] toHttpClient(List<NameValuePair> pairs)
Converts the specified name/value pairs into HttpClient name/value pairs.

Parameters:
pairs - the name/value pairs to convert
Returns:
the converted name/value pairs


Copyright © 2002-2010 Gargoyle Software Inc.. All Rights Reserved.