param1 = value; param2 = "anything goes; really"; param3
| Modifier and Type | Field and Description |
|---|---|
| private char[] | chars
String to be parsed. |
| private int | i1
Start of a token. |
| private int | i2
End of a token. |
| private int | len
Maximum position in the string. |
| private boolean | lowerCaseNames
Whether names stored in the map should be converted to lower case. |
| private int | pos
Current position in the string. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private String | Returns: the tokentrue if quotation marks are expected,
false otherwise.A helper method to process the parsed token. |
| private boolean | Returns: true if there are unparsed characters,
false otherwise.Are there any characters left to parse? |
| public boolean | Returns: true if parameter names are to be
converted to lower case when name/value pairs are parsed.
Otherwise returns falseReturns |
| private boolean | Returns: true if the character is present in the array of
characters, false otherwise.the character to test for presence in the array of characters ch, final char[] the array of characters to test against charray)Tests if the given character is present in the array of characters. |
| public Map | |
| public Map | |
| public Map | Returns: a map of name/value pairsthe array of characters that contains a sequence of
name/value pairs charArray, final char the name/value pairs separator separator)Extracts a map of name/value pairs from the given array of characters. |
| public Map | Returns: a map of name/value pairsthe array of characters that contains a sequence of
name/value pairs charArray, final int - the initial offset. offset, final int - the length. length, final char the name/value pairs separator separator)Extracts a map of name/value pairs from the given array of characters. |
| private String | Returns: the tokenthe array of terminating characters. Any of these
characters when encountered outside the quotation marks signify the end
of the token terminators)Parses out a token until any of the given terminators is encountered outside the quotation marks. |
| private String | Returns: the tokenthe array of terminating characters. Any of these
characters when encountered signify the end of the token terminators)Parses out a token until any of the given terminators is encountered. |
| public void | setLowerCaseNames(final boolean
true if parameter names are to be
converted to lower case when name/value pairs are parsed.
false otherwise.Sets the flag if parameter names are to be converted to lower case when name/value pairs are parsed. |
| chars | back to summary |
|---|---|
| private char[] chars String to be parsed. | |
| i1 | back to summary |
|---|---|
| private int i1 Start of a token. | |
| i2 | back to summary |
|---|---|
| private int i2 End of a token. | |
| len | back to summary |
|---|---|
| private int len Maximum position in the string. | |
| lowerCaseNames | back to summary |
|---|---|
| private boolean lowerCaseNames Whether names stored in the map should be converted to lower case. | |
| pos | back to summary |
|---|---|
| private int pos Current position in the string. | |
| ParameterParser | back to summary |
|---|---|
| public ParameterParser() Default ParameterParser constructor. | |
| getToken | back to summary |
|---|---|
| private String getToken(final boolean quoted) A helper method to process the parsed token. This method removes leading and trailing blanks as well as enclosing quotation marks, when necessary.
| |
| hasChar | back to summary |
|---|---|
| private boolean hasChar() Are there any characters left to parse?
| |
| isLowerCaseNames | back to summary |
|---|---|
| public boolean isLowerCaseNames() Returns
| |
| isOneOf | back to summary |
|---|---|
| private boolean isOneOf(final char ch, final char[] charray) Tests if the given character is present in the array of characters.
| |
| parse | back to summary |
|---|---|
| public Map Extracts a map of name/value pairs from the given string. Names are expected to be unique. Multiple separators may be specified and the earliest found in the input string is used. | |
| parse | back to summary |
|---|---|
| public Map Extracts a map of name/value pairs from the given string. Names are expected to be unique. | |
| parse | back to summary |
|---|---|
| public Map Extracts a map of name/value pairs from the given array of characters. Names are expected to be unique. | |
| parse | back to summary |
|---|---|
| public Map Extracts a map of name/value pairs from the given array of characters. Names are expected to be unique. | |
| parseQuotedToken | back to summary |
|---|---|
| private String parseQuotedToken(final char[] terminators) Parses out a token until any of the given terminators is encountered outside the quotation marks.
| |
| parseToken | back to summary |
|---|---|
| private String parseToken(final char[] terminators) Parses out a token until any of the given terminators is encountered.
| |
| setLowerCaseNames | back to summary |
|---|---|
| public void setLowerCaseNames(final boolean b) Sets the flag if parameter names are to be converted to lower case when name/value pairs are parsed.
| |