TrieSet extends AbstractSet<String> { @Override public boolean add(String string) { return trie.put(string, PRESENT) == null; } 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 add() { assertTrue(set.add("lol")); assertFalse(set.add("lol")); }