List<FileNameMatcher> (@NotNull T type) { List<FileNameMatcher> result = new ArrayList<>(); for (Pair<FileNameMatcher, T> mapping : myMatchingMappings) { if (type.equals(mapping.getSecond())) { result.add(mapping.getFirst()); } } for (Map.Entry<CharSequence, T> entry : myExactFileNameMappings.entrySet()) { if (type.equals(entry.getValue())) { result.add(new ExactFileNameMatcher(entry.getKey().toString(), false)); } } for (Map.Entry<CharSequence, T> entry : myExactFileNameAnyCaseMappings.entrySet()) { if (type.equals(entry.getValue())) { result.add(new ExactFileNameMatcher(entry.getKey().toString(), true)); } } for (Map.Entry<CharSequence, T> entry : myExtensionMappings.entrySet()) { if (type.equals(entry.getValue())) { result.add(new ExtensionFileNameMatcher(entry.getKey().toString())); } } return result; }