Class NameValuePair

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    KeyDataPair

    public class NameValuePair
    extends java.lang.Object
    implements java.io.Serializable
    A name/value pair.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      NameValuePair​(java.lang.String name, java.lang.String value)
      Creates a new instance.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object object)
      java.lang.String getName()
      Returns the name.
      java.lang.String getValue()
      Returns the value.
      int hashCode()
      static org.apache.http.NameValuePair[] toHttpClient​(NameValuePair[] pairs)
      Converts the specified name/value pairs into HttpClient name/value pairs.
      static java.util.List<org.apache.http.NameValuePair> toHttpClient​(java.util.List<NameValuePair> pairs)
      Converts the specified name/value pairs into HttpClient name/value pairs.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NameValuePair

        public NameValuePair​(java.lang.String name,
                             java.lang.String value)
        Creates a new instance.
        Parameters:
        name - the name
        value - the value
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name.
        Returns:
        the name
      • getValue

        public java.lang.String getValue()
        Returns the value.
        Returns:
        the value
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.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 java.util.List<org.apache.http.NameValuePair> toHttpClient​(java.util.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