V
- public class Trie<V> extends Object
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)
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.
|
Set<String> |
keySet() |
boolean |
put(String s,
V v)
Put and entry into the Trie
|
boolean |
put(V v)
Put a value as both a key and a value.
|
V |
remove(String s) |
String |
toString() |
public boolean put(String s, V v)
s
- The key for the entryv
- The value of the entrypublic boolean put(V v)
v
- public V get(ByteBuffer b, int offset, int len)
b
- The bufferoffset
- The offset within the buffer of the keylen
- the length of the keypublic V getBest(byte[] b, int offset, int len)
b
- The bufferoffset
- The offset within the array of the keylen
- the length of the keypublic V getBest(ByteBuffer b, int offset, int len)
b
- The bufferoffset
- The offset within the buffer of the keylen
- the length of the keyCopyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.