| Modifier and Type | Field and Description |
|---|---|
| public static final Comparator | COMPARATOR
Comparator for two AffixMatcher instances which prioritizes longer prefixes followed by longer suffixes, ensuring that the longest prefix/suffix pair is always chosen. |
| private final int | |
| private final AffixPatternMatcher | |
| private final AffixPatternMatcher |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | createMatchers(AffixPatternProvider patternInfo, NumberParserImpl output, AffixTokenMatcherFactory factory, IgnorablesMatcher ignorables, int parseFlags)
|
| public boolean | equals(Object
the reference object with which to compare. _other)Overrides java. |
| private static final AffixMatcher | |
| public int | |
| private static boolean | |
| private static int | length(AffixPatternMatcher matcher)
Helper method to return the length of the given AffixPatternMatcher. |
| 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. |
| pack-priv static boolean | matched(AffixPatternMatcher affix, String patternString)
Helper method to return whether the given AffixPatternMatcher equals the given pattern string. |
| 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 |
| COMPARATOR | back to summary |
|---|---|
| public static final Comparator<AffixMatcher> COMPARATOR Comparator for two AffixMatcher instances which prioritizes longer prefixes followed by longer suffixes, ensuring that the longest prefix/suffix pair is always chosen. | |
| flags | back to summary |
|---|---|
| private final int flags | |
| prefix | back to summary |
|---|---|
| private final AffixPatternMatcher prefix | |
| suffix | back to summary |
|---|---|
| private final AffixPatternMatcher suffix | |
| AffixMatcher | back to summary |
|---|---|
| private AffixMatcher(AffixPatternMatcher prefix, AffixPatternMatcher suffix, int flags) | |
| createMatchers | back to summary |
|---|---|
| public static void createMatchers(AffixPatternProvider patternInfo, NumberParserImpl output, AffixTokenMatcherFactory factory, IgnorablesMatcher ignorables, int parseFlags) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object _other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getInstance | back to summary |
|---|---|
| private static final AffixMatcher getInstance(AffixPatternMatcher prefix, AffixPatternMatcher suffix, int flags) | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isInteresting | back to summary |
|---|---|
| private static boolean isInteresting(AffixPatternProvider patternInfo, IgnorablesMatcher ignorables, int parseFlags) | |
| length | back to summary |
|---|---|
| private static int length(AffixPatternMatcher matcher) Helper method to return the length of the given AffixPatternMatcher. Returns 0 for null. | |
| 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.
| |
| matched | back to summary |
|---|---|
| pack-priv static boolean matched(AffixPatternMatcher affix, String patternString) Helper method to return whether the given AffixPatternMatcher equals the given pattern string. Either both arguments must be null or the pattern string inside the AffixPatternMatcher must equal the given pattern string. | |
| 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. | |