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

Method intern

output/java_guava/1.4.19/Interners.java:48–52  ·  view source on GitHub ↗
(E sample)

Source from the content-addressed store, hash-verified

46 final ConcurrentMap<E, E> map = new MapMaker().makeMap();
47 return new Interner<E>() {
48 @Override
49 public E intern(E sample) {
50 E canonical = map.putIfAbsent(checkNotNull(sample), sample);
51 return (canonical == null) ? sample : canonical;
52 }
53 };
54 }
55

Callers

nothing calls this directly

Calls 2

putIfAbsentMethod · 0.45
checkNotNullMethod · 0.45

Tested by

no test coverage detected