Package com.atlassian.jira.util
Class KeyValueParser
java.lang.Object
com.atlassian.jira.util.KeyValueParser
Parses a key-value pair in a String such as "portNumber=5432" into its separate values
- Since:
- v4.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyValuePair<String, String> Parses the input text into a key and value using '=' as a separator.
-
Constructor Details
-
KeyValueParser
public KeyValueParser()
-
-
Method Details
-
parse
Parses the input text into a key and value using '=' as a separator.eg "colour=red" will parse into "colour", "red"
If more than one equals sign is discovered, then the first is interpreted as the separator and subsequent ones are interpreted as part of the "value".
- Parameters:
text- The text to parse.- Returns:
- The parsed value
-