Package be.panako.util
Class Trie
java.lang.Object
be.panako.util.Trie
public class Trie
extends java.lang.Object
A trie that can be used for auto completion
- Author:
- Marcus McCurdy (marcus.mccurdy@gmail.com)
-
Constructor Summary
Constructors Constructor Description Trie()
-
Method Summary
Modifier and Type Method Description java.util.Collection<java.lang.String>
autoComplete(java.lang.String prefix)
java.lang.String
find(java.lang.String word)
void
insert(java.lang.String word)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Trie
public Trie()
-
-
Method Details
-
insert
public void insert(java.lang.String word) -
find
public java.lang.String find(java.lang.String word) -
autoComplete
public java.util.Collection<java.lang.String> autoComplete(java.lang.String prefix)
-