Top Fields Constructors Methods
com.ibm.icu.impl.breakiter

pack-priv Class BytesDictionaryMatcher

extends DictionaryMatcher
Class Inheritance
Imports
java.text.CharacterIterator, com.ibm.icu.impl.Assert, com.ibm.icu.text.UCharacterIterator, com.ibm.icu.util.BytesTrie, .BytesTrie.Result

Field Summary

Modifier and TypeField and Description
private final byte[]
private final int

Constructor Summary

AccessConstructor and Description
public
BytesDictionaryMatcher(byte[] chars, int transform)

Method Summary

Modifier and TypeMethod and Description
public int
public int
matches(CharacterIterator
A CharacterIterator representing the text. The iterator is left after the longest prefix match in the dictionary.
text_
,
int
The maximum number of code units to match.
maxLength
,
int[]
An array that is filled with the lengths of words that matched.
lengths
,
int[]
Filled with the number of elements output in lengths.
count_
,
int
The maximum amount of words to output. Must be less than or equal to lengths.length.
limit
,
int[]
Filled with the weight values associated with the various words.
values
)

Implements abstract com.ibm.icu.impl.breakiter.DictionaryMatcher.matches.

Find dictionary words that match the text.
private int
transform(int c)

Inherited from com.ibm.icu.impl.breakiter.DictionaryMatcher:
matches

Field Detail

charactersback to summary
private final byte[] characters
transformback to summary
private final int transform

Constructor Detail

BytesDictionaryMatcherback to summary
public BytesDictionaryMatcher(byte[] chars, int transform)

Method Detail

getTypeback to summary
public int getType()

Implements abstract com.ibm.icu.impl.breakiter.DictionaryMatcher.getType.

Returns:int

Doc from com.ibm.icu.impl.breakiter.DictionaryMatcher.getType.

the kind of dictionary that this matcher is using

Annotations
@Override
matchesback to summary
public int matches(CharacterIterator text_, int maxLength, int[] lengths, int[] count_, int limit, int[] values)

Implements abstract com.ibm.icu.impl.breakiter.DictionaryMatcher.matches.

Doc from com.ibm.icu.impl.breakiter.DictionaryMatcher.matches.

Find dictionary words that match the text.

Parameters
text_:CharacterIterator

A CharacterIterator representing the text. The iterator is left after the longest prefix match in the dictionary.

maxLength:int

The maximum number of code units to match.

lengths:int[]

An array that is filled with the lengths of words that matched.

count_:int[]

Filled with the number of elements output in lengths.

limit:int

The maximum amount of words to output. Must be less than or equal to lengths.length.

values:int[]

Filled with the weight values associated with the various words.

Returns:int

The number of characters in text that were matched.

Annotations
@Override
transformback to summary
private int transform(int c)