RangeMarker (int start, int end) { List<RangeMarker> guardedBlocks = myGuardedBlocks; //noinspection ForLoopReplaceableByForEach for (int i = 0; i < guardedBlocks.size(); i++) { RangeMarker block = guardedBlocks.get(i); if (rangesIntersect(start, end, true, true, block.getStartOffset(), block.getEndOffset(), block.isGreedyToLeft(), block.isGreedyToRight())) { return block; } } return null; }