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 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 getGroupMembers(){ return m_MemberList;} public String getGroupName(){ return m_Name; } public int isEmpty(){return m_MemberList.size();} public boolean isOwner(UUID uuid){ if(m_MemberList.get(0)==uuid){ return true; }else{ return false; } } }