com.atlassian.jira.util
Class KeyValueParser

java.lang.Object
  extended by 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 Summary
KeyValueParser()
           
 
Method Summary
static KeyValuePair<String,String> parse(String text)
          Parses the input text into a key and value using '=' as a separator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyValueParser

public KeyValueParser()
Method Detail

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


Copyright © 2002-2013 Atlassian. All Rights Reserved.