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

Method getAt

output/java_guava/1.4.19/Striped.java:466–478  ·  view source on GitHub ↗
(int index)

Source from the content-addressed store, hash-verified

464 }
465
466 @Override
467 public L getAt(int index) {
468 if (size != Integer.MAX_VALUE) {
469 Preconditions.checkElementIndex(index, size());
470 } // else no check necessary, all index values are valid
471 L existing = locks.get(index);
472 if (existing != null) {
473 return existing;
474 }
475 L created = supplier.get();
476 existing = locks.putIfAbsent(index, created);
477 return MoreObjects.firstNonNull(existing, created);
478 }
479
480 @Override
481 public int size() {

Callers

nothing calls this directly

Calls 5

checkElementIndexMethod · 0.95
sizeMethod · 0.95
firstNonNullMethod · 0.95
getMethod · 0.65
putIfAbsentMethod · 0.45

Tested by

no test coverage detected