Package com.ibm.icu.impl.number.parse
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 com.ibm.icu.impl.number.parse.NumberParseMatcher
NumberParseMatcher.Flexible
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private AffixTokenMatcherFactory
private IgnorablesMatcher
private int
Fields inherited from class com.ibm.icu.impl.number.parse.SeriesMatcher
frozen, matchers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
consumeToken
(int typeOrCp) This method is NOT intended to be called directly.boolean
static AffixPatternMatcher
fromAffixPattern
(String affixPattern, AffixTokenMatcherFactory factory, int parseFlags) Creates an AffixPatternMatcher (based on SeriesMatcher) from the given affix pattern.int
hashCode()
toString()
Methods inherited from class com.ibm.icu.impl.number.parse.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:
consumeToken
in interfaceAffixUtils.TokenConsumer
-
getPattern
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toString
in classSeriesMatcher
-