Class OptionalMetaPattern
- java.lang.Object
-
- org.apache.wicket.util.parse.metapattern.MetaPattern
-
- org.apache.wicket.util.parse.metapattern.OptionalMetaPattern
-
- All Implemented Interfaces:
Serializable
,IClusterable
public final class OptionalMetaPattern extends MetaPattern
Makes any MetaPattern optional by enclosing the pattern in an optionality expression. The expression will be something equivalent to "(?:<pattern>)?".- Author:
- Jonathan Locke
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.util.parse.metapattern.MetaPattern
AMPERSAND, ANYTHING, ANYTHING_NON_EMPTY, AT_SIGN, BACKSLASH, COLON, COMMA, DASH, DIGIT, DIGITS, DOLLAR_SIGN, DOT, DOUBLE_QUOTED_STRING, EQUALS, EXCLAMATION_POINT, FLOATING_POINT_NUMBER, HEXADECIMAL_DIGIT, HEXADECIMAL_DIGITS, INTEGER, LEFT_CURLY, LEFT_PAREN, LEFT_SQUARE, MINUS, NON_WORD, OPTIONAL_STRING, OPTIONAL_WHITESPACE, OPTIONAL_WORD, PERCENT, PERL_INTERPOLATION, PIPE, PLUS, POSITIVE_INTEGER, POUND_SIGN, RIGHT_CURLY, RIGHT_PAREN, RIGHT_SQUARE, SEMICOLON, SLASH, STAR, STRING, TILDE, UNDERSCORE, VARIABLE_NAME, WHITESPACE, WORD, XML_ATTRIBUTE_NAME, XML_ELEMENT_NAME
-
-
Constructor Summary
Constructors Constructor Description OptionalMetaPattern(String pattern)
ConstructorOptionalMetaPattern(List<MetaPattern> patterns)
ConstructorOptionalMetaPattern(MetaPattern pattern)
ConstructorOptionalMetaPattern(MetaPattern[] patterns)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
Converts this MetaPattern to a String.-
Methods inherited from class org.apache.wicket.util.parse.metapattern.MetaPattern
matcher, matcher, pattern, pattern
-
-
-
-
Constructor Detail
-
OptionalMetaPattern
public OptionalMetaPattern(String pattern)
Constructor- Parameters:
pattern
-
-
OptionalMetaPattern
public OptionalMetaPattern(MetaPattern pattern)
Constructor- Parameters:
pattern
- MetaPattern to make optional
-
OptionalMetaPattern
public OptionalMetaPattern(List<MetaPattern> patterns)
Constructor- Parameters:
patterns
-
-
OptionalMetaPattern
public OptionalMetaPattern(MetaPattern[] patterns)
Constructor- Parameters:
patterns
-
-
-
Method Detail
-
toString
public String toString()
Description copied from class:MetaPattern
Converts this MetaPattern to a String.- Overrides:
toString
in classMetaPattern
- Returns:
- String representation of this pattern
- See Also:
Object.toString()
-
-