MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / Safe

Class Safe

concurrent/SharedConstructorArgument.java:16–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16class Safe implements SharedArg {
17 private static AtomicInteger counter =
18 new AtomicInteger();
19 @Override public int get() {
20 return counter.getAndIncrement();
21 }
22}
23
24class SharedUser implements HasID {
25 private final int id;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected