Class BytesDictionaryMatcher

java.lang.Object
com.ibm.icu.impl.breakiter.DictionaryMatcher
com.ibm.icu.impl.breakiter.BytesDictionaryMatcher

class BytesDictionaryMatcher extends DictionaryMatcher
  • Field Details

    • characters

      private final byte[] characters
    • transform

      private final int transform
  • Constructor Details

    • BytesDictionaryMatcher

      public BytesDictionaryMatcher(byte[] chars, int transform)
  • Method Details

    • transform

      private int transform(int c)
    • matches

      public int matches(CharacterIterator text_, int maxLength, int[] lengths, int[] count_, int limit, int[] values)
      Description copied from class: DictionaryMatcher
      Find dictionary words that match the text.
      Specified by:
      matches in class DictionaryMatcher
      Parameters:
      text_ - A CharacterIterator representing the text. The iterator is left after the longest prefix match in the dictionary.
      maxLength - The maximum number of code units to match.
      lengths - An array that is filled with the lengths of words that matched.
      count_ - Filled with the number of elements output in lengths.
      limit - The maximum amount of words to output. Must be less than or equal to lengths.length.
      values - Filled with the weight values associated with the various words.
      Returns:
      The number of characters in text that were matched.
    • getType

      public int getType()
      Specified by:
      getType in class DictionaryMatcher
      Returns:
      the kind of dictionary that this matcher is using