Interface Group

All Superinterfaces:
Principal

public interface Group
extends Principal
A Principal that represents a group of principals.
See Also:
Principal
  • Method Details

    • addMember

      boolean addMember​(Principal user)
      Adds a member to this group.
      Parameters:
      user - the member to add.
      Returns:
      true if the member was added, false if it was already a member.
    • removeMember

      boolean removeMember​(Principal user)
      Removes a member from this group.
      Parameters:
      user - the member to remove.
      Returns:
      true if the member was removed, false if it was not a member.
    • isMember

      boolean isMember​(Principal member)
      Returns whether the specified principal is a member of this group.
      Parameters:
      member - the principal to check.
      Returns:
      true if the principal is a member, otherwise false.
    • members

      Enumeration<? extends Principal> members()
      Returns the members of this group.
      Returns:
      the members of this group.