@Override public int previous(){
  CharacterIterator text=getText();
  if (current() == text.getBeginIndex()) {
    return BreakIterator.DONE;
  }
  int start=current();
  int lastResult=cachedLastKnownBreak;
  if (lastResult >= start || lastResult <= BreakIterator.DONE) {
    getPrevious();
    lastResult=handlePrevious();
  }
 else {
    text.setIndex(lastResult);
  }
  int result=lastResult;
  while (result != BreakIterator.DONE && result < start) {
    lastResult=result;
    result=handleNext();
  }
  text.setIndex(lastResult);
  cachedLastKnownBreak=lastResult;
  return lastResult;
}

@ Override public int previous ( ) { CharacterIterator text = getText ( ) ; if ( current ( ) == text . getBeginIndex ( ) ) { return BreakIterator . DONE ; } int start = current ( ) ; int lastResult = cachedLastKnownBreak ; if ( lastResult >= start || lastResult <= BreakIterator . DONE ) { getPrevious ( ) ; lastResult = handlePrevious ( ) ; } else { text . setIndex ( lastResult ) ; } int result = lastResult ; while ( result != BreakIterator . DONE && result < start ) { lastResult = result ; result = handleNext ( ) ; } text . setIndex ( lastResult ) ; cachedLastKnownBreak = lastResult ; return lastResult ; }
advances the iterator backwards , to the last boundary preceding this one .
