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, remove
public boolean put(String s, V v)
Trie
s
- The key for the entryv
- The value of the entrypublic V get(String s, int offset, int len)
Trie
s
- The keyoffset
- The offset within the string of the keylen
- the length of the keypublic V get(ByteBuffer b, int offset, int len)
Trie
b
- The bufferoffset
- The offset within the buffer of the keylen
- the length of the keypublic V getBest(byte[] b, int offset, int len)
Trie
public V getBest(ByteBuffer b, int offset, int len)
Trie
b
- The bufferoffset
- The offset within the buffer of the keylen
- the length of the keypublic V getBest(String s, int offset, int len)
Trie
s
- The stringoffset
- The offset within the string of the keylen
- the length of the keypublic boolean isFull()
Copyright © 1995-2014 Mort Bay Consulting. All Rights Reserved.