T - the type of value to store for byte sequencespublic class ByteTrie<T> extends Object
| Constructor and Description |
|---|
ByteTrie() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPath(T value,
byte[]... parts)
Store the given value at the specified path.
|
T |
find(byte[] bytes)
Return the most specific value stored for this byte sequence.
|
int |
getMaxDepth()
Gets the maximum depth stored in this trie.
|
void |
setDefaultValue(T defaultValue)
Sets the default value to use in
find(byte[]) when no path matches. |
public T find(byte[] bytes)
null or a default values as specified by
calling setDefaultValue(T).public void addPath(T value, byte[]... parts)
public void setDefaultValue(T defaultValue)
find(byte[]) when no path matches.public int getMaxDepth()
Copyright © 2002-2017 Drew Noakes. All Rights Reserved.