Package com.day.util
Class NameValuePair
- java.lang.Object
-
- com.day.util.NameValuePair
-
public class NameValuePair extends Object
The NameValuePair class implements a structure of a name and an optional value.- Since:
- coati Audience wad
-
-
Constructor Summary
Constructors Constructor Description NameValuePair(String name, String value)Creates a new name value pair
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Gets the nameStringgetValue()Gets the valuestatic NameValuePairparse(String str)Parses a line of the form: {ws} name {ws} ["=" {ws} value {ws}];static NameValuePairparse(String str, char equal)Parses a line of the form: {ws} name {ws} ["<equal>" {ws} value {ws}];
-
-
-
Method Detail
-
getName
public String getName()
Gets the name- Returns:
- the name
-
getValue
public String getValue()
Gets the value- Returns:
- the value
-
parse
public static NameValuePair parse(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(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
-
-