TrieSet extends AbstractSet<String> { @Override public Iterator<String> iterator() { return trie.keySet().iterator(); } 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 iterator() { set = new TrieSet(); set.add("lol"); for (var string : set) { assertEquals("lol", string); } }