org.apache.wicket.util.parse.metapattern.parsers
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
Method Summary |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
matches
public final boolean matches()
- Parse the input and add the elements to an internal list to be accessed by
- Overrides:
matches
in class MetaPatternParser
- Returns:
- whether the matcher matches
- See Also:
getValues()
,
MetaPatternParser.matches()
getValues
public final List<String> 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
Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.