org.apache.wicket.util.parse.metapattern
Class Group

java.lang.Object
  extended by org.apache.wicket.util.parse.metapattern.MetaPattern
      extended by org.apache.wicket.util.parse.metapattern.Group
All Implemented Interfaces:
java.io.Serializable, IClusterable
Direct Known Subclasses:
BooleanGroup, FloatingPointGroup, IntegerGroup

public class Group
extends MetaPattern

A Group is a piece of a regular expression (referenced by some Java field or local variable) that forms a "capturing group" within the larger regular expression. A Group is bound to a regular expression MetaPattern when a matcher is retrieved for the pattern by calling one of the matcher() methods. Once bound, a Group cannot be rebound.

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
Group(MetaPattern pattern)
          Constructor.
 
Method Summary
 java.lang.String get(java.util.regex.Matcher matcher)
          Threadsafe method to retrieve contents of this captured group.
 java.lang.String toString()
          Converts this MetaPattern to a String.
 
Methods inherited from class org.apache.wicket.util.parse.metapattern.MetaPattern
matcher, matcher, pattern, pattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Group

public Group(MetaPattern pattern)
Constructor.

Parameters:
pattern - MetaPattern to capture
Method Detail

get

public final java.lang.String get(java.util.regex.Matcher matcher)
Threadsafe method to retrieve contents of this captured group.

Parameters:
matcher - The matcher from which to retrieve this Group's group
Returns:
The captured characters

toString

public java.lang.String toString()
Description copied from class: MetaPattern
Converts this MetaPattern to a String.

Overrides:
toString in class MetaPattern
Returns:
A String representing this MetaPattern
See Also:
Object.toString()


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.