Class AffixPatternMatcher
java.lang.Object
com.ibm.icu.impl.number.parse.SeriesMatcher
com.ibm.icu.impl.number.parse.AffixPatternMatcher
- All Implemented Interfaces:
AffixUtils.TokenConsumer, NumberParseMatcher
A specialized version of
SeriesMatcher that matches EITHER a prefix OR a suffix.
AffixMatcher combines two of these in order to match both the prefix and suffix.-
Nested Class Summary
Nested classes/interfaces inherited from interface NumberParseMatcher
NumberParseMatcher.Flexible -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate AffixTokenMatcherFactoryprivate IgnorablesMatcherprivate intFields inherited from class SeriesMatcher
frozen, matchers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconsumeToken(int typeOrCp) This method is NOT intended to be called directly.booleanstatic AffixPatternMatcherfromAffixPattern(String affixPattern, AffixTokenMatcherFactory factory, int parseFlags) Creates an AffixPatternMatcher (based on SeriesMatcher) from the given affix pattern.inthashCode()toString()Methods inherited from class SeriesMatcher
addMatcher, freeze, length, match, postProcess, smokeTest
-
Field Details
-
affixPattern
-
factory
-
ignorables
-
lastTypeOrCp
private int lastTypeOrCp
-
-
Constructor Details
-
AffixPatternMatcher
-
-
Method Details
-
fromAffixPattern
public static AffixPatternMatcher fromAffixPattern(String affixPattern, AffixTokenMatcherFactory factory, int parseFlags) Creates an AffixPatternMatcher (based on SeriesMatcher) from the given affix pattern. Returns null if the affix pattern is empty. -
consumeToken
public void consumeToken(int typeOrCp) This method is NOT intended to be called directly. It is here for the AffixUtils.TokenConsumer interface only.- Specified by:
consumeTokenin interfaceAffixUtils.TokenConsumer
-
getPattern
-
equals
-
hashCode
-
toString
- Overrides:
toStringin classSeriesMatcher
-