| |
|
| java.lang.Object org.apache.wicket.util.parse.metapattern.MetaPattern org.apache.wicket.util.parse.metapattern.Group org.apache.wicket.util.parse.metapattern.IntegerGroup
IntegerGroup | final public class IntegerGroup extends Group (Code) | | A Group that captures integer values (positive and negative whole numbers,
not Java ints).
author: Jonathan Locke |
Constructor Summary | |
public | IntegerGroup() Constructs an IntegerGroup that parses Strings that match the INTEGER
pattern in base 10. | public | IntegerGroup(MetaPattern pattern) Constructs an IntegerGroup that parses Strings that match the given
pattern in base 10. | public | IntegerGroup(MetaPattern pattern, int radix) Constructs an IntegerGroup that parses Strings that match the given
pattern in the given radix. |
Method Summary | |
public int | getInt(Matcher matcher) | public int | getInt(Matcher matcher, int defaultValue) Gets an int by parsing the String matched by this capturing group. | public long | getLong(Matcher matcher) | public long | getLong(Matcher matcher, long defaultValue) Gets a long by parsing the String matched by this capturing group. |
IntegerGroup | public IntegerGroup()(Code) | | Constructs an IntegerGroup that parses Strings that match the INTEGER
pattern in base 10.
See Also: MetaPattern.INTEGER |
IntegerGroup | public IntegerGroup(MetaPattern pattern)(Code) | | Constructs an IntegerGroup that parses Strings that match the given
pattern in base 10.
Parameters: pattern - The capturing pattern |
IntegerGroup | public IntegerGroup(MetaPattern pattern, int radix)(Code) | | Constructs an IntegerGroup that parses Strings that match the given
pattern in the given radix.
Parameters: pattern - The capturing pattern Parameters: radix - The radix to use when parsing captured Strings |
getInt | public int getInt(Matcher matcher, int defaultValue)(Code) | | Gets an int by parsing the String matched by this capturing group. The
IntegerGroup's radix is used in the conversion.
Parameters: matcher - The matcher Parameters: defaultValue - The default value to use if this group is omitted because itis optional The parsed int value |
getLong | public long getLong(Matcher matcher, long defaultValue)(Code) | | Gets a long by parsing the String matched by this capturing group. The
IntegerGroup's radix is used in the conversion. parsing radix.
Parameters: defaultValue - The default value to use if this group is omitted because itis optional Parameters: matcher - The matcher The parsed long value |
|
|
|