Module org.apache.wicket.util
Class ListParser
java.lang.Object
org.apache.wicket.util.parse.metapattern.parsers.MetaPatternParser
org.apache.wicket.util.parse.metapattern.parsers.ListParser
- Direct Known Subclasses:
CommaSeparatedVariableParser
Parses an arbitrary list format with a pattern for list entries and a pattern for list
separators.
- Author:
- Jonathan Locke
-
Constructor Summary
ConstructorDescriptionListParser
(MetaPattern entryPattern, MetaPattern separatorPattern, CharSequence input) Constructs a list parser from an entry MetaPattern, a separator MetaPattern and an input character sequence. -
Method Summary
Methods inherited from class org.apache.wicket.util.parse.metapattern.parsers.MetaPatternParser
advance, atEnd, matcher, setPattern
-
Constructor Details
-
ListParser
Constructs a list parser from an entry MetaPattern, a separator MetaPattern and an input character sequence.- Parameters:
entryPattern
- The pattern in between the separatorsseparatorPattern
- The separator patterninput
- The input to parse
-
-
Method Details
-
matches
Parse the input and add the elements to an internal list to be accessed by- Overrides:
matches
in classMetaPatternParser
- Returns:
- whether the matcher matches
- See Also:
-
getValues
Gets the parsed values. It depends on the elements pattern, whether empty elements, double or single quotes or escape characters are supported.- Returns:
- the parsed values
-