text: public int next() {if (text.getIndex() == text.getEndIndex() || 0 == sentenceStarts.length) {return DONE;} else if (currentSentence < sentenceStarts.length - 1) {text.setIndex(sentenceStarts[++currentSentence]);return current();} else {return last();}}