public class Trie<T> extends java.lang.Object
Constructor and Description |
---|
Trie() |
Modifier and Type | Method and Description |
---|---|
T |
getLongestPrefix(java.lang.String sequence)
Returns the value associated with the longest known prefix of this sequence,
or null if no known prefix exists.
|
void |
put(java.lang.String prefix,
T value)
Map the prefix to the given value.
|
public Trie()
public T getLongestPrefix(java.lang.String sequence)