MCPcopy Create free account
hub / github.com/antlr/codebuff / checkElementIndex

Method checkElementIndex

output/java_guava/1.4.19/Preconditions.java:1223–1226  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 15

getMethod · 0.95
getMethod · 0.95
getAtMethod · 0.95
getAtMethod · 0.95
getMethod · 0.45
setMethod · 0.45
getMethod · 0.45
setMethod · 0.45
getMethod · 0.45
setMethod · 0.45
getMethod · 0.45
setMethod · 0.45

Calls 1

badElementIndexMethod · 0.95

Tested by

no test coverage detected