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 Details

    • 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 separators
      separatorPattern - The separator pattern
      input - The input to parse
  • Method Details

    • 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

      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