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
public class AffixPatternMatcher extends SeriesMatcher implements AffixUtils.TokenConsumer
A specialized version ofSeriesMatcher
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
Fields Modifier and Type Field Description private java.lang.String
affixPattern
private AffixTokenMatcherFactory
factory
private IgnorablesMatcher
ignorables
private int
lastTypeOrCp
-
Fields inherited from class com.ibm.icu.impl.number.parse.SeriesMatcher
frozen, matchers
-
-
Constructor Summary
Constructors Modifier Constructor Description private
AffixPatternMatcher(java.lang.String affixPattern)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
consumeToken(int typeOrCp)
This method is NOT intended to be called directly.boolean
equals(java.lang.Object other)
static AffixPatternMatcher
fromAffixPattern(java.lang.String affixPattern, AffixTokenMatcherFactory factory, int parseFlags)
Creates an AffixPatternMatcher (based on SeriesMatcher) from the given affix pattern.java.lang.String
getPattern()
int
hashCode()
java.lang.String
toString()
-
Methods inherited from class com.ibm.icu.impl.number.parse.SeriesMatcher
addMatcher, freeze, length, match, postProcess, smokeTest
-
-
-
-
Field Detail
-
affixPattern
private final java.lang.String affixPattern
-
factory
private AffixTokenMatcherFactory factory
-
ignorables
private IgnorablesMatcher ignorables
-
lastTypeOrCp
private int lastTypeOrCp
-
-
Method Detail
-
fromAffixPattern
public static AffixPatternMatcher fromAffixPattern(java.lang.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
public java.lang.String getPattern()
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classSeriesMatcher
-
-