public class TextTrieMap<V> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TextTrieMap.CharIterator |
static class |
TextTrieMap.Output |
static interface |
TextTrieMap.ResultHandler<V>
Callback handler for processing prefix matches used by
find method.
|
| Constructor and Description |
|---|
TextTrieMap(boolean ignoreCase)
Constructs a TextTrieMap object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
find(CharSequence text,
int offset,
TextTrieMap.ResultHandler<V> handler) |
void |
find(CharSequence text,
TextTrieMap.ResultHandler<V> handler) |
Iterator<V> |
get(CharSequence text,
int start)
Gets an iterator of the objects associated with the
longest prefix matching string key starting at the
specified position.
|
Iterator<V> |
get(CharSequence text,
int start,
TextTrieMap.Output output) |
Iterator<V> |
get(String text)
Gets an iterator of the objects associated with the
longest prefix matching string key.
|
TextTrieMap<V> |
put(CharSequence text,
V val)
Adds the text key and its associated object in this object.
|
void |
putLeadCodePoints(UnicodeSet output) |
public TextTrieMap(boolean ignoreCase)
ignoreCase - true to use simple case insensitive matchpublic TextTrieMap<V> put(CharSequence text, V val)
text - The text.val - The value object associated with the text.public Iterator<V> get(String text)
text - The text to be matched with prefixes.public Iterator<V> get(CharSequence text, int start)
text - The text to be matched with prefixes.start - The start index of of the textpublic Iterator<V> get(CharSequence text, int start, TextTrieMap.Output output)
public void find(CharSequence text, TextTrieMap.ResultHandler<V> handler)
public void find(CharSequence text, int offset, TextTrieMap.ResultHandler<V> handler)
public void putLeadCodePoints(UnicodeSet output)