V - public class ArrayTrie<V> extends AbstractTrie<V>
This implementation is always case insensitive and is optimal for a small number of fixed strings with few special characters.
| Constructor and Description |
|---|
ArrayTrie() |
ArrayTrie(int capacityInNodes) |
| Modifier and Type | Method and Description |
|---|---|
V |
get(ByteBuffer b,
int offset,
int len)
Get and exact match from a segment of a ByteBuufer as key
|
V |
get(String s,
int offset,
int len)
Get and exact match from a String key
|
V |
getBest(byte[] b,
int offset,
int len)
Get the best match from key in a byte array.
|
V |
getBest(ByteBuffer b,
int offset,
int len)
Get the best match from key in a byte buffer.
|
V |
getBest(String s,
int offset,
int len)
Get the best match from key in a String.
|
boolean |
isFull() |
Set<String> |
keySet() |
boolean |
put(String s,
V v)
Put and entry into the Trie
|
String |
toString() |
get, get, getBest, isCaseInsensitive, put, removepublic boolean put(String s, V v)
Tries - The key for the entryv - The value of the entrypublic V get(String s, int offset, int len)
Tries - The keyoffset - The offset within the string of the keylen - the length of the keypublic V get(ByteBuffer b, int offset, int len)
Trieb - The bufferoffset - The offset within the buffer of the keylen - the length of the keypublic V getBest(byte[] b, int offset, int len)
Triepublic V getBest(ByteBuffer b, int offset, int len)
Trieb - The bufferoffset - The offset within the buffer of the keylen - the length of the keypublic V getBest(String s, int offset, int len)
Tries - The stringoffset - The offset within the string of the keylen - the length of the keypublic boolean isFull()
Copyright © 1995-2016 Mort Bay Consulting. All Rights Reserved.