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()]);}

public Term[] GetStopWords(){IList<Term> allStopWords = new List<Term>();foreach (string fieldName in stopWordsPerField.Keys){ISet<string> stopWords = stopWordsPerField[fieldName];foreach (string text in stopWords){allStopWords.Add(new Term(fieldName, text));}}return allStopWords.ToArray();}
