MCPcopy Index your code
hub / github.com/careercup/ctci / getInstance

Method getInstance

java/Chapter 8/Question8_7/UserManager.java:13–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 private HashMap<Integer, User> onlineUsers = new HashMap<Integer, User>();
12
13 public static UserManager getInstance() {
14 if (instance == null) {
15 instance = new UserManager();
16 }
17 return instance;
18 }
19
20 public void addUser(User fromUser, String toAccountName) {
21 User toUser = usersByAccountName.get(toAccountName);

Callers 1

requestAddUserMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected