TrieSet extends AbstractSet<String> { @Override public boolean contains(Object object) { return trie.containsKey(object); } TrieSet(); Set<String> startsWith(String prefix); @Override boolean add(String string); @Override boolean contains(Object object); @Override boolean remove(Object object); @Override Iterator<String> iterator(); @Override int size();  }
@Test void contains() { set.add("lol"); assertTrue(set.contains("lol")); assertFalse(set.contains("lo")); }