public class ParameterParser
extends java.lang.Object
Parameter values are expected to be enclosed in quotes if they contain unsafe characters, such as '=' characters or separators. Parameter values are optional and can be omitted.
param1 = value; param2 = "anything goes; really"; param3
| Constructor and Description |
|---|
ParameterParser() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
parse(java.lang.String str,
char separator)
Extracts a map of name/value pairs from the given string.
|
java.util.Map<java.lang.String,java.lang.String> |
parse(java.lang.String str,
char[] separators)
Extracts a map of name/value pairs from the given string.
|
public java.util.Map<java.lang.String,java.lang.String> parse(java.lang.String str,
char[] separators)
str - the string that contains a sequence of name/value pairsseparators - the name/value pairs separatorspublic java.util.Map<java.lang.String,java.lang.String> parse(java.lang.String str,
char separator)
str - the string that contains a sequence of name/value pairsseparator - the name/value pairs separator