private static String buildBadElementIndexMessage(int index, int size, String desc) {
		if (index < 0) {
			return format("%s (%s) must not be negative", desc, index);
		} else if (size < 0) {
			throw new IllegalArgumentException("negative size: " + size);
		} else { // index >= size
			return format("%s (%s) must be less than size (%s)", desc, index, size);
		}
	}
Ensures that {@code index} specifies a valid <i>element</i> in an array, list or string of size {@code size}. An
element index may range from zero, inclusive, to {@code size}, exclusive.

@param index a user-supplied index identifying an element of an array, list or string
@param size  the size of that array, list or string
@param desc  the text to use to describe this index in an error message
@return the value of {@code index}
ngrinder-core/src/main/java/org/ngrinder/common/util/Preconditions.java