Set<String> () { if (dictionaries == null) { return Collections.emptySet(); } Set<String> words = CollectionFactory.createSmallMemoryFootprintSet(); for (Dictionary dictionary : dictionaries) { words.addAll(dictionary.getWords()); } return words; }