@Override protected int handleNext(){
  CharacterIterator text=getText();
  if (cachedBreakPositions == null || positionInCache == cachedBreakPositions.length - 1) {
    int startPos=text.getIndex();
    dictionaryCharCount=0;
    int result=super.handleNext();
    if (dictionaryCharCount > 1 && result - startPos > 1) {
      divideUpDictionaryRange(startPos,result);
    }
 else {
      cachedBreakPositions=null;
      return result;
    }
  }
  if (cachedBreakPositions != null) {
    ++positionInCache;
    text.setIndex(cachedBreakPositions[positionInCache]);
    return cachedBreakPositions[positionInCache];
  }
  return -9999;
}

@ Override protected int handleNext ( ) { CharacterIterator text = getText ( ) ; if ( cachedBreakPositions == null || positionInCache == cachedBreakPositions . length - 1 ) { int startPos = text . getIndex ( ) ; dictionaryCharCount = 0 ; int result = super . handleNext ( ) ; if ( dictionaryCharCount > 1 && result - startPos > 1 ) { divideUpDictionaryRange ( startPos , result ) ; } else { cachedBreakPositions = null ; return result ; } } if ( cachedBreakPositions != null ) { ++ positionInCache ; text . setIndex ( cachedBreakPositions [ positionInCache ] ) ; return cachedBreakPositions [ positionInCache ] ; } return - 9999 ; }
this is the implementation function for next ( ) .
