Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/BruceEckel/OnJava8-Examples
/ show
Method
show
patterns/SingletonPattern.java:24–27 ·
view source on GitHub ↗
(Resource<T> r)
Source
from the content-addressed store, hash-verified
22
23
public
class
SingletonPattern {
24
public
static
<T>
void
show(Resource<T> r) {
25
T val = r.get();
26
System.out.println(val);
27
}
28
public
static
<T>
void
put(Resource<T> r, T val) {
29
r.set(val);
30
}
Callers
1
main
Method · 0.95
Calls
1
get
Method · 0.65
Tested by
no test coverage detected