java.security.acl
Interface Group

All Superinterfaces:
Principal

public interface Group
extends Principal

This interface represents a group of Principals. Note that since this interface extends Principal, a Group can be used where ever a Principal is requested. This includes arguments to the methods in this interface.


Method Summary
 boolean addMember(Principal user)
          This method adds a new Principal to this group.
 boolean isMember(Principal member)
          This method tests whether or not a given Principal is a member of this group.
 Enumeration<? extends Principal> members()
          This method returns a list of all members of the group as an Enumeration.
 boolean removeMember(Principal user)
          This method deletes a member from the group.
 
Methods inherited from interface java.security.Principal
equals, getName, hashCode, toString
 

Method Detail

addMember

boolean addMember(Principal user)
This method adds a new Principal to this group.

Parameters:
user - The new Principal to add
Returns:
true if the user was successfully added or false if the user is already a member

removeMember

boolean removeMember(Principal user)
This method deletes a member from the group.

Parameters:
user - The Principal to delete
Returns:
true if the user was successfully deleted or false if the user is not a member of the group

isMember

boolean isMember(Principal member)
This method tests whether or not a given Principal is a member of this group.

Parameters:
member - The Principal to test for membership
Returns:
true if the user is member, false otherwise

members

Enumeration<? extends Principal> members()
This method returns a list of all members of the group as an Enumeration.

Returns:
The list of all members of the group