Package com.day.util
Class NameValuePair
java.lang.Object
com.day.util.NameValuePair
The NameValuePair class implements a structure of a name and an optional
value.
- Since:
- coati Audience wad
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Gets the namegetValue()Gets the valuestatic NameValuePairParses a line of the form: {ws} name {ws} ["=" {ws} value {ws}];static NameValuePairParses a line of the form: {ws} name {ws} ["<equal>" {ws} value {ws}];
-
Constructor Details
-
NameValuePair
Creates a new name value pair- Parameters:
name- the namevalue- the value
-
-
Method Details
-
getName
Gets the name- Returns:
- the name
-
getValue
Gets the value- Returns:
- the value
-
parse
Parses a line of the form: {ws} name {ws} ["=" {ws} value {ws}];- Parameters:
str- the string to parse- Returns:
- the parsed nv pair
-
parse
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
-