diff --git a/src/main/java/com/example/cosmos_serversb/entities/Group.java b/src/main/java/com/example/cosmos_serversb/entities/Group.java index eb988d8..e774568 100644 --- a/src/main/java/com/example/cosmos_serversb/entities/Group.java +++ b/src/main/java/com/example/cosmos_serversb/entities/Group.java @@ -78,6 +78,10 @@ return members; } + public void deleteMember(User user){ + members.remove(user); + } + public void clearAllMembersForDeleteGroup(){ members.clear(); } @@ -96,10 +100,7 @@ } public boolean equals(Group group) { - if(this.gId == group.getgId()){ - return true; - } - return false; + return this.gId.equals(group.getgId()); } }