MCPcopy Index your code
hub / github.com/libgdx/libgdx / validateRange

Method validateRange

gdx/src/com/badlogic/gdx/utils/CharArray.java:2067–2072  ·  view source on GitHub ↗

Validates parameters defining a range of this CharArray. @param start the start index, inclusive @param end the end index, exclusive @return A valid end index. @throws IndexOutOfBoundsException if the index is invalid

(int start, int end)

Source from the content-addressed store, hash-verified

2065 * @return A valid end index.
2066 * @throws IndexOutOfBoundsException if the index is invalid */
2067 protected int validateRange (int start, int end) {
2068 if (start < 0) throw new IndexOutOfBoundsException("start: " + start);
2069 if (end > size) throw new IndexOutOfBoundsException("end: " + end + ", size: " + size);
2070 if (start > end) throw new IndexOutOfBoundsException("start: " + start + ", end: " + end);
2071 return end;
2072 }
2073
2074 /** Tests the contents of this CharArray against another to see if they contain the same character content. Returns false if
2075 * either array is unordered.

Callers 6

removeRangeMethod · 0.95
deleteMethod · 0.95
replaceMethod · 0.95
subSequenceMethod · 0.95
substringMethod · 0.95
toCharArrayMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected