boolean (@NotNull CharSequence text, int startOffset, int endOffset, @NotNull StringSearcher searcher, @NotNull IntPredicate processor) { for (int offset : getTextOccurrences(text, startOffset, endOffset, searcher)) { if (!processor.test(offset)) { return false; } } return true; }