You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
847 B

package org.poopki.duckdns.user_db;
import java.util.List;
import java.util.ArrayList;
import java.util.UUID;
public class Group {
private String m_Name;
private List<UUID> m_MemberList = new ArrayList<>();
public Group(String Name, UUID uuid){
m_MemberList.add(0, uuid);
m_Name = Name;
}
public void SignUp(UUID uuid){
m_MemberList.add(uuid);
}
public void Expulsion(UUID uuid){
m_MemberList.remove(uuid);
}
public boolean isMember(UUID uuid){
return m_MemberList.contains(uuid);
}
public List<UUID> getGroupMembers(){ return m_MemberList;}
public String getGroupName(){ return m_Name; }
public boolean isOwner(UUID uuid){
if(m_MemberList.get(0)==uuid){
return true;
}else{
return false;
}
}
}