Class KeyValueParser

java.lang.Object
com.atlassian.jira.util.KeyValueParser

public class KeyValueParser extends Object
Parses a key-value pair in a String such as "portNumber=5432" into its separate values
Since:
v4.4
  • Constructor Details

    • KeyValueParser

      public KeyValueParser()
  • Method Details

    • parse

      public static KeyValuePair<String,String> parse(String text)
      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