public class ValueParser extends Object
| Constructor and Description |
|---|
ValueParser() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
stringToMap(String s)
Parses a string of key/value pairs into a map.
|
public static Map<String,String> stringToMap(String s)
The key/value pairs are separated by a comma (). The key and value are separated by an equals ().
If a key contains a \ or an = it must be escaped by a preceding \. Example: key\==value,\\key=value.
If a value contains a \ or a , it must be escaped by a preceding \. Example: key=part1\,part2,key2=value\\other.
If the value for a key is empty there is no trailing = after a key the value is assigned an empty
string.
s - the string to parsenull or emptyCopyright © 2015 JBoss by Red Hat. All rights reserved.