FileDocCategorySizeDatePackage
PrefixTrieTest.javaAPI DocExample1419Mon Jul 23 13:26:26 BST 2007org.apache.struts2.util

PrefixTrieTest

public class PrefixTrieTest extends TestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtestPutGet()

        PrefixTrie trie = new PrefixTrie();
        Object foo = new Object();
        trie.put("foo:", foo);
        Object a = new Object();
        trie.put("a:", a);
        assertSame(foo, trie.get("foo:bar"));
        assertSame(a, trie.get("a:bar"));
        assertNull(trie.get("tee:bar"));
        assertNull(trie.get("foobar"));