public interface NumberParseMatcher
| Modifier and Type | Interface and Description |
|---|---|
static interface |
NumberParseMatcher.Flexible
Matchers can implement the Flexible interface to indicate that they are optional and can be run
repeatedly.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
match(StringSegment segment,
ParsedNumber result)
Runs this matcher starting at the beginning of the given StringSegment.
|
void |
postProcess(ParsedNumber result)
Method called at the end of a parse, after all matchers have failed to consume any more chars.
|
boolean |
smokeTest(StringSegment segment)
Performs a fast "smoke check" for whether or not this matcher could possibly match against the
given string segment.
|
boolean match(StringSegment segment, ParsedNumber result)
segment - The StringSegment to match against. Matches always start at the beginning of the
segment. The segment is guaranteed to contain at least one char.result - The data structure to store results if the match succeeds.boolean smokeTest(StringSegment segment)
StringSegment.startsWith(int) method in order to correctly
handle case folding.segment - The segment to check against.void postProcess(ParsedNumber result)
result - The data structure to store results.