@Override
    public void next() {
      myLast = null;

      while (myIndex < myChanged.size()) {
        Range range = myChanged.get(myIndex);
        myIndex++;

        if (range.end1 < myStart1 || range.end2 < myStart2) continue;
        if (range.start1 > myEnd1 || range.start2 > myEnd2) break;

        Range newRange = new Range(Math.max(myStart1, range.start1) - myStart1, Math.min(myEnd1, range.end1) - myStart1,
                                   Math.max(myStart2, range.start2) - myStart2, Math.min(myEnd2, range.end2) - myStart2);
        if (newRange.isEmpty()) continue;

        myLast = newRange;
        break;
      }
    }
@Override
    public void next()