public int next(int n) {currentSentence += n;if (n < 0) {if (text.getIndex() == text.getEndIndex()) {++currentSentence;}if (currentSentence < 0) {currentSentence = 0;text.setIndex(text.getBeginIndex());return DONE;} else {text.setIndex(sentenceStarts[currentSentence]);}} else if (n > 0) {if (currentSentence >= sentenceStarts.length) {currentSentence = sentenceStarts.length - 1;text.setIndex(text.getEndIndex());return DONE;} else {text.setIndex(sentenceStarts[currentSentence]);}}return current();}
public override int Next(int n){currentSentence += n;if (n < 0){if (text.Index == text.EndIndex){++currentSentence;}if (currentSentence < 0){currentSentence = 0;text.SetIndex(text.BeginIndex);return Done;}else{text.SetIndex(sentenceStarts[currentSentence]);}}else if (n > 0){if (currentSentence >= sentenceStarts.Length){currentSentence = sentenceStarts.Length - 1;text.SetIndex(text.EndIndex);return Done;}else{text.SetIndex(sentenceStarts[currentSentence]);}}return Current;}