boolean (String name, @Nullable VirtualFile parent) { final Ref<String> parentRef = Ref.create(null); //noinspection ForLoopReplaceableByForEach for (int i = 0; i < myCompiledPatterns.size(); i++) { if (matches(name, parent, parentRef, myCompiledPatterns.get(i))) { return true; } } if (myNegatedCompiledPatterns.isEmpty()) { return false; } //noinspection ForLoopReplaceableByForEach for (int i = 0; i < myNegatedCompiledPatterns.size(); i++) { if (matches(name, parent, parentRef, myNegatedCompiledPatterns.get(i))) { return false; } } return true; }