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
public class ListParser extends MetaPatternParser
Parses an arbitrary list format with a pattern for list entries and a pattern for list separators.- Author:
- Jonathan Locke
-
-
Constructor Summary
Constructors Constructor Description ListParser(MetaPattern entryPattern, MetaPattern separatorPattern, CharSequence input)
Constructs a list parser from an entry MetaPattern, a separator MetaPattern and an input character sequence.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getValues()
Gets the parsed values.boolean
matches()
Parse the input and add the elements to an internal list to be accessed by-
Methods inherited from class org.apache.wicket.util.parse.metapattern.parsers.MetaPatternParser
advance, atEnd, matcher, setPattern
-
-
-
-
Constructor Detail
-
ListParser
public ListParser(MetaPattern entryPattern, MetaPattern separatorPattern, CharSequence input)
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 Detail
-
matches
public final boolean 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()
,MetaPatternParser.matches()
-
-