@Override
  public Pair<Integer, CharSequence> next() {
    int offset1 = myDocument.getLineStartOffset(myLine);
    int offset2 = myDocument.getLineEndOffset(myLine);

    CharSequence text = myDocument.getImmutableCharSequence().subSequence(offset1, offset2);

    Pair<Integer, CharSequence> pair = new Pair<>(myLine, text);
    myLine++;

    return pair;
  }
@Override
  public Pair<Integer, CharSequence> next()