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

pack-priv abstract Class DictionaryMatcher

extends Object
Class Inheritance
Known Direct Subclasses
com.ibm.icu.impl.breakiter.BytesDictionaryMatcher, com.ibm.icu.impl.breakiter.CharsDictionaryMatcher
Imports
java.text.CharacterIterator

The DictionaryMatcher interface is used to allow arbitrary "types" of back-end data structures to be used with the break iteration code.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public abstract int

Returns:

the kind of dictionary that this matcher is using
getType
()

public abstract int

Returns:

The number of characters in text that were matched.
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
)

Find dictionary words that match the text.

public int
matches(CharacterIterator text, int maxLength, int[] lengths, int[] count, int limit)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DictionaryMatcherback to summary
pack-priv DictionaryMatcher()

Method Detail

getTypeback to summary
public abstract int getType()
Returns:int

the kind of dictionary that this matcher is using

matchesback to summary
public abstract int matches(CharacterIterator text, int maxLength, int[] lengths, int[] count, int limit, int[] values)

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.

matchesback to summary
public int matches(CharacterIterator text, int maxLength, int[] lengths, int[] count, int limit)