public void removeUser(String username) { // TODO: handle if user doesn't exist! User removeUser = this.userStorage.remove(username); for (Mumble mumble : removeUser.getMumbles()) { this.mumbleStorage.remove(mumble.getId()); this.mumbleTimeline.remove(mumble); } }
public void removeMumble(String mumbleId) { // TODO: handle if mumble doesn't exist! Mumble removedMumble = this.mumbleStorage.remove(mumbleId); this.mumbleTimeline.remove(removedMumble); // remove the mumble from the User! User user = this.userStorage.get(removedMumble.getUsername()); user.getMumbles().remove(removedMumble); }