protected static final void checkOffset(int offset,CharacterIterator text){
  if (offset < text.getBeginIndex() || offset > text.getEndIndex()) {
    throw new IllegalArgumentException("offset out of bounds");
  }
}

protected static final void checkOffset ( int offset , CharacterIterator text ) { if ( offset < text . getBeginIndex ( ) || offset > text . getEndIndex ( ) ) { throw new IllegalArgumentException ( "offset out of bounds" ) ; } }
throw illegalargumentexception unless begin < = offset < end .
