public class

KeyValueParser

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

Class Overview

Parses a key-value pair in a String such as "portNumber=5432" into its separate values

Summary

Public Constructors
KeyValueParser()
Public Methods
static KeyValuePair<StringString> parse(String text)
Parses the input text into a key and value using '=' as a separator.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public KeyValueParser ()

Public Methods

public static KeyValuePair<StringString> 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