protected int handlePrevious(){
  CharacterIterator text=getText();
  int state=START_STATE;
  int category=0;
  int lastCategory=0;
  int c=getCurrent();
  while (c != CharacterIterator.DONE && state != STOP_STATE) {
    lastCategory=category;
    category=lookupCategory(c);
    if (category != IGNORE) {
      state=lookupBackwardState(state,category);
    }
    c=getPrevious();
  }
  if (c != CharacterIterator.DONE) {
    if (lastCategory != IGNORE) {
      getNext();
      getNext();
    }
 else {
      getNext();
    }
  }
  return text.getIndex();
}

protected int handlePrevious ( ) { CharacterIterator text = getText ( ) ; int state = START_STATE ; int category = 0 ; int lastCategory = 0 ; int c = getCurrent ( ) ; while ( c != CharacterIterator . DONE && state != STOP_STATE ) { lastCategory = category ; category = lookupCategory ( c ) ; if ( category != IGNORE ) { state = lookupBackwardState ( state , category ) ; } c = getPrevious ( ) ; } if ( c != CharacterIterator . DONE ) { if ( lastCategory != IGNORE ) { getNext ( ) ; getNext ( ) ; } else { getNext ( ) ; } } return text . getIndex ( ) ; }
this method backs the iterator back up to a " safe position " in the text . this is a position that we know , without any context , must be a break position . the various calling methods then iterate forward from this safe position to the appropriate position to return . ( for more information , see the description of buildbackwardsstatetable ( ) in rulebasedbreakiterator . builder . )
