Package com.day.util

Class NameValuePair


  • public class NameValuePair
    extends java.lang.Object
    The NameValuePair class implements a structure of a name and an optional value.
    Since:
    coati Audience wad
    • Constructor Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Gets the name
      java.lang.String getValue()
      Gets the value
      static NameValuePair parse​(java.lang.String str)
      Parses a line of the form: {ws} name {ws} ["=" {ws} value {ws}];
      static NameValuePair parse​(java.lang.String str, char equal)
      Parses a line of the form: {ws} name {ws} ["<equal>" {ws} value {ws}];
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NameValuePair

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

      • getName

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

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

        public static NameValuePair parse​(java.lang.String str)
        Parses a line of the form: {ws} name {ws} ["=" {ws} value {ws}];
        Parameters:
        str - the string to parse
        Returns:
        the parsed nv pair
      • parse

        public static NameValuePair parse​(java.lang.String str,
                                          char equal)
        Parses a line of the form: {ws} name {ws} ["<equal>" {ws} value {ws}];
        Parameters:
        str - the string to parse
        equal - the delimiter for the equal sign
        Returns:
        the parsed nv pair