Set<String> (Set<String> keywordSet) { if (!myIgnoreCase) { return new HashSet<>(keywordSet); } final Set<String> result = new HashSet<>(); for (String s : keywordSet) { result.add(StringUtil.toUpperCase(s)); } return result; }