An implementation of Group that manages a collection of Principal
objects based on their hashCode() and equals() methods. This class
is not thread safe.
- $Revision: 243 $
Adds the specified member to the group.
user the principal to add to this group.
- true if the member was successfully added,
false if the principal was already a member.
return isMember == false;
Returns true if the passed principal is a member of the group.
This method does a recursive search, so if a principal belongs to a
group which is a member of this group, true is returned.
A special check is made to see if the member is an instance of
org.jboss.security.AnybodyPrincipal or org.jboss.security.NobodyPrincipal
since these classes do not hash to meaningful values.
member the principal whose membership is to be checked.
- true if the principal is a member of this group,
while( isMember == false && iter.hasNext() )
if( next instanceof Group )
Returns an enumeration of the members in the group.
The returned objects can be instances of either Principal
or Group (which is a subinterface of Principal).
- an enumeration of the group members.
Removes the specified member from the group.
user the principal to remove from this group.
- true if the principal was removed, or
false if the principal was not a member.