code: public static void checkIntInRange(int index, int start, int end) {
      if (index < start) {
        throw new IndexOutOfBoundsException(ExceptionMessageMap.getMessage("000006") + "  { index=["
            + index + "], start=[" + start + "], end=[" + end + "] }");
      }
      if (index >= end) {
        throw new IndexOutOfBoundsException(ExceptionMessageMap.getMessage("000006") + "  { index=["
            + index + "], start=[" + start + "], end=[" + end + "] }");
      }
    }
docs: A general range check utility for checking whether a given &lt;integer&gt; value is between a
  given start and end indexes. This is a helper method for other methods such as
  checkIntIndexInListRange or can also be used independently by external objects.
  
  @param index
  Given index that is being checked for validity between start and end.
  @param start
  index should be greater than or equal to start.
  @param end
  index should be less than end.