public void checkIndex(final int index) {
		if (index < 0 || index >= length()) {
			throw new ArrayIndexOutOfBoundsException(format(
				"Index %s is out of bounds [0, %s)", index, length()
			));
		}
	}
Check the given array {@code index}

@param index the index to check
@throws ArrayIndexOutOfBoundsException if the given index is not in the
        valid range.
jenetics/src/main/java/io/jenetics/internal/collection/Array.java