Package com.day.util
Class NameValuePair
- java.lang.Object
-
- com.day.util.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 namejava.lang.String
getValue()
Gets the valuestatic 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}];
-
-
-
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 parseequal
- the delimiter for the equal sign- Returns:
- the parsed nv pair
-
-