MCPcopy Index your code
hub / github.com/apache/groovy / get

Method get

src/main/java/groovy/lang/IntRange.java:422–431  ·  view source on GitHub ↗

{@inheritDoc}

(int index)

Source from the content-addressed store, hash-verified

420 * {@inheritDoc}
421 */
422 @Override
423 public Integer get(int index) {
424 if (index < 0) {
425 throw new IndexOutOfBoundsException("Index: " + index + " should not be negative");
426 }
427 if (index >= size()) {
428 throw new IndexOutOfBoundsException("Index: " + index + " too big for range: " + this);
429 }
430 return isReverse() ? getTo() - index : index + getFrom();
431 }
432
433 /**
434 * {@inheritDoc}

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.95
isReverseMethod · 0.95
getToMethod · 0.95
getFromMethod · 0.95

Tested by

no test coverage detected