text: public Term[] getStopWords() {List<Term> allStopWords = new ArrayList<>();for (Map.Entry<String, Set<String>> entry : stopWordsPerField.entrySet()) {String field = entry.getKey();Set<String> stopWords = entry.getValue();for (String text : stopWords) {allStopWords.add(new Term(field, text));}}return allStopWords.toArray(new Term[allStopWords.size()]);}