| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final UnicodeSet | |
| private final String[] | |
| private final int | |
| private final int | |
| private final boolean | groupingDisabled
If true, do not accept grouping separators at all |
| private final String | |
| private final UnicodeSet | |
| private final boolean | integerOnly
If true, do not accept numbers in the fraction |
| private final UnicodeSet | |
| private final boolean | requireGroupingMatch
If true, only accept strings whose grouping sizes match the locale |
| private final UnicodeSet |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DecimalMatcher | |
| public boolean | match(StringSegment
The StringSegment to match against. Matches always start at the beginning of the
segment. The segment is guaranteed to contain at least one char. segment, ParsedNumber The data structure to store results if the match succeeds. result)Implements com. |
| public boolean | match(StringSegment segment, ParsedNumber result, int
-1 means a negative exponent; +1 means a positive exponent; 0 means NO exponent. If -1
or +1, the number will be saved by scaling the pre-existing DecimalQuantity in the
ParsedNumber. If 0, a new DecimalQuantity will be created to store the number. exponentSign)
|
| public void | postProcess(ParsedNumber
The data structure to store results. result)Implements com. |
| public boolean | smokeTest(StringSegment
The segment to check against. segment)Implements com. |
| public String | |
| private boolean |
| decimalSeparator | back to summary |
|---|---|
| private final String decimalSeparator | |
| decimalUniSet | back to summary |
|---|---|
| private final UnicodeSet decimalUniSet | |
| digitStrings | back to summary |
|---|---|
| private final String[] digitStrings | |
| grouping1 | back to summary |
|---|---|
| private final int grouping1 | |
| grouping2 | back to summary |
|---|---|
| private final int grouping2 | |
| groupingDisabled | back to summary |
|---|---|
| private final boolean groupingDisabled If true, do not accept grouping separators at all | |
| groupingSeparator | back to summary |
|---|---|
| private final String groupingSeparator | |
| groupingUniSet | back to summary |
|---|---|
| private final UnicodeSet groupingUniSet | |
| integerOnly | back to summary |
|---|---|
| private final boolean integerOnly If true, do not accept numbers in the fraction | |
| leadSet | back to summary |
|---|---|
| private final UnicodeSet leadSet | |
| requireGroupingMatch | back to summary |
|---|---|
| private final boolean requireGroupingMatch If true, only accept strings whose grouping sizes match the locale | |
| separatorSet | back to summary |
|---|---|
| private final UnicodeSet separatorSet | |
| DecimalMatcher | back to summary |
|---|---|
| private DecimalMatcher(DecimalFormatSymbols symbols, Grouper grouper, int parseFlags) | |
| getInstance | back to summary |
|---|---|
| public static DecimalMatcher getInstance(DecimalFormatSymbols symbols, Grouper grouper, int parseFlags) | |
| match | back to summary |
|---|---|
| public boolean match(StringSegment segment, ParsedNumber result) Implements com. Doc from com. Runs this matcher starting at the beginning of the given StringSegment. If this matcher finds something interesting in the StringSegment, it should update the offset of the StringSegment corresponding to how many chars were matched.
| |
| match | back to summary |
|---|---|
public boolean match(StringSegment segment, ParsedNumber result, int exponentSign)
| |
| postProcess | back to summary |
|---|---|
| public void postProcess(ParsedNumber result) Implements com. Doc from com. Method called at the end of a parse, after all matchers have failed to consume any more chars. Allows a matcher to make final modifications to the result given the knowledge that no more matches are possible.
| |
| smokeTest | back to summary |
|---|---|
| public boolean smokeTest(StringSegment segment) Implements com. Doc from com. Performs a fast "smoke check" for whether or not this matcher could possibly match against the
given string segment. The test should be as fast as possible but also as restrictive as possible.
For example, matchers can maintain a UnicodeSet of all code points that count possibly start a
match. Matchers should use the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| validateGroup | back to summary |
|---|---|
| private boolean validateGroup(int sepType, int count, boolean isPrimary) | |