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

Method approveAddRequest

java/Chapter 8/Question8_7/UserManager.java:27–33  ·  view source on GitHub ↗
(AddRequest req)

Source from the content-addressed store, hash-verified

25 }
26
27 public void approveAddRequest(AddRequest req) {
28 req.status = RequestStatus.Accepted;
29 User from = req.getFromUser();
30 User to = req.getToUser();
31 from.addContact(to);
32 to.addContact(from);
33 }
34
35 public void rejectAddRequest(AddRequest req) {
36 req.status = RequestStatus.Rejected;

Callers

nothing calls this directly

Calls 3

addContactMethod · 0.95
getFromUserMethod · 0.80
getToUserMethod · 0.80

Tested by

no test coverage detected