wicket.util.parse.metapattern
Class FloatingPointGroup
java.lang.Object
wicket.util.parse.metapattern.MetaPattern
wicket.util.parse.metapattern.Group
wicket.util.parse.metapattern.FloatingPointGroup
public final class FloatingPointGroup
- extends Group
A Group that captures floating point values (doubles and floats).
- Author:
- Jonathan Locke
| Fields inherited from class 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 |
|
Constructor Summary |
FloatingPointGroup()
Constructs an FloatingPointGroup that parses Strings that match the
FLOATING_POINT_NUMBER pattern. |
|
Method Summary |
double |
getDouble(java.util.regex.Matcher matcher)
|
double |
getDouble(java.util.regex.Matcher matcher,
double defaultValue)
Gets double by parsing the String matched by this capturing group. |
float |
getFloat(java.util.regex.Matcher matcher)
|
float |
getFloat(java.util.regex.Matcher matcher,
float defaultValue)
Gets float by parsing the String matched by this capturing group. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FloatingPointGroup
public FloatingPointGroup()
- Constructs an FloatingPointGroup that parses Strings that match the
FLOATING_POINT_NUMBER pattern.
- See Also:
MetaPattern.FLOATING_POINT_NUMBER
getFloat
public float getFloat(java.util.regex.Matcher matcher)
- Parameters:
matcher - The matcher
- Returns:
- The value
getFloat
public float getFloat(java.util.regex.Matcher matcher,
float defaultValue)
- Gets float by parsing the String matched by this capturing group.
- Parameters:
matcher - The matcherdefaultValue - The default value to use if this group is omitted because it
is optional
- Returns:
- The parsed value
getDouble
public double getDouble(java.util.regex.Matcher matcher)
- Parameters:
matcher - The matcher
- Returns:
- The value
getDouble
public double getDouble(java.util.regex.Matcher matcher,
double defaultValue)
- Gets double by parsing the String matched by this capturing group.
- Parameters:
matcher - The matcherdefaultValue - The default value to use if this group is omitted because it
is optional
- Returns:
- The parsed value
Copyright © 2004-2007 Wicket developers. All Rights Reserved.