docs: public static int checkIndex(int index, int size, String errorMsgTemplate, Object... params) throws IllegalArgumentException, IndexOutOfBoundsException {
  		if (index < 0 || index >= size) {
  			throw new IndexOutOfBoundsException(badIndexMsg(index, size, errorMsgTemplate, params));
  		}
  		return index;
  	}