### Question:
TrieData implements Iterable<TrieNodeData<T>>, Serializable { public void addWord(String word, T data) { if (!caseSensitive) word = word.toLowerCase(); root.addWord(root, word.toCharArray(), data); } TrieData();  TrieData(boolean caseSensitive); void addWord(String word, T data); T getWordData(String word); void toIdFile(OutputStream os); @Override Iterator<TrieNodeData<T>> iterator();  }### Answer:
@Test public void testIterate() { TrieData<Integer> t = new TrieData<Integer>(); t.addWord("1", 1); t.addWord("2", 2); t.addWord("100", 100); t.addWord("1000", 1000); for (TrieNodeData<Integer> trieNodeData : t) { System.out.println(trieNodeData); } }