Ensures that index specifies a valid element in an array, list or string of size size. An element index may range from zero, inclusive, to size, exclusive. @param index a user-supplied index identifying an element of an array, list or string @param size the size of th
(int index, int size)
| 1221 | */ |
| 1222 | |
| 1223 | @CanIgnoreReturnValue |
| 1224 | public static int checkElementIndex(int index, int size) { |
| 1225 | return checkElementIndex(index, size, "index"); |
| 1226 | } |
| 1227 | |
| 1228 | /** |
| 1229 | * Ensures that {@code index} specifies a valid <i>element</i> in an array, list or string of size |