public void setText(CharacterIterator newText) {text = newText;text.setIndex(text.getBeginIndex());currentSentence = 0;Span[] spans = sentenceOp.splitSentences(characterIteratorToString());sentenceStarts = new int[spans.length];for (int i = 0; i < spans.length; ++i) {sentenceStarts[i] = spans[i].getStart() + text.getBeginIndex();}}
public override void SetText(CharacterIterator newText){text = newText;text.SetIndex(text.BeginIndex);currentSentence = 0;Span[] spans = sentenceOp.SplitSentences(CharacterIteratorToString());sentenceStarts = new int[spans.Length];for (int i = 0; i < spans.Length; ++i){sentenceStarts[i] = spans[i].getStart() + text.BeginIndex;}}