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 of SeriesMatcher that matches EITHER a prefix OR a suffix. AffixMatcher combines two of these in order to match both the prefix and suffix.
  • Field Details

  • Constructor Details

    • AffixPatternMatcher

      private AffixPatternMatcher(String affixPattern)
  • 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 interface AffixUtils.TokenConsumer
    • getPattern

      public String getPattern()
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class SeriesMatcher