MCPcopy Create free account
hub / github.com/careercup/ctci / sendMessageToGroupChat

Method sendMessageToGroupChat

java/Chapter 8/Question8_7/User.java:35–42  ·  view source on GitHub ↗
(int groupId, String content)

Source from the content-addressed store, hash-verified

33 }
34
35 public boolean sendMessageToGroupChat(int groupId, String content) {
36 GroupChat chat = groupChats.get(groupId);
37 if (chat != null) {
38 Message message = new Message(content, new Date());
39 return chat.addMessage(message);
40 }
41 return false;
42 }
43
44 public void setStatus(UserStatus status) {
45 this.status = status;

Callers

nothing calls this directly

Calls 2

addMessageMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected