Class GroupRegistry

java.lang.Object
me.totalfreedom.data.GroupRegistry

public class GroupRegistry extends Object
A registry for Groups.
  • Constructor Details

    • GroupRegistry

      public GroupRegistry()
      Creates a new group registry.
  • Method Details

    • registerGroup

      public boolean registerGroup(Group group)
      Registers a group.
      Parameters:
      group - The group to register.
      Returns:
      true if the group was registered, false otherwise.
    • unregisterGroup

      public boolean unregisterGroup(Group group)
      Unregisters a group.
      Parameters:
      group - The group to unregister.
      Returns:
      true if the group was unregistered, false otherwise.
    • getGroup

      public Group getGroup(String name)
      Gets a group by name.
      Parameters:
      name - The name of the group.
      Returns:
      The group, or null if no group was found.
    • getGroups

      public List<Group> getGroups()
      Returns:
      The list of groups.