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

Method badPositionIndex

output/java_guava/1.4.18/Preconditions.java:1296–1304  ·  view source on GitHub ↗
(int index, int size, String desc)

Source from the content-addressed store, hash-verified

1294 }
1295
1296 private static String badPositionIndex(int index, int size, String desc) {
1297 if (index < 0) {
1298 return format("%s (%s) must not be negative", desc, index);
1299 } else if (size < 0) {
1300 throw new IllegalArgumentException("negative size: " + size);
1301 } else { // index > size
1302 return format("%s (%s) must not be greater than size (%s)", desc, index, size);
1303 }
1304 }
1305
1306 /**
1307 * Ensures that {@code start} and {@code end} specify a valid <i>positions</i> in an array, list

Callers 2

checkPositionIndexMethod · 0.95
badPositionIndexesMethod · 0.95

Calls 1

formatMethod · 0.95

Tested by

no test coverage detected