Package java.security.acl
Interface Group
- All Superinterfaces:
Principal
public interface Group extends Principal
A
Principal that represents a group of principals.- See Also:
Principal
-
Method Summary
Modifier and Type Method Description booleanaddMember(Principal user)Adds a member to this group.booleanisMember(Principal member)Returns whether the specified principal is a member of this group.Enumeration<? extends Principal>members()Returns the members of this group.booleanremoveMember(Principal user)Removes a member from this group.
-
Method Details
-
addMember
Adds a member to this group.- Parameters:
user- the member to add.- Returns:
trueif the member was added,falseif it was already a member.
-
removeMember
Removes a member from this group.- Parameters:
user- the member to remove.- Returns:
trueif the member was removed,falseif it was not a member.
-
isMember
Returns whether the specified principal is a member of this group.- Parameters:
member- the principal to check.- Returns:
trueif the principal is a member, otherwisefalse.
-
members
Enumeration<? extends Principal> members()Returns the members of this group.- Returns:
- the members of this group.
-