All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jnfs.security.acl.GroupImpl

java.lang.Object
   |
   +----jnfs.security.acl.PrincipalImpl
           |
           +----jnfs.security.acl.GroupImpl

public class GroupImpl
extends PrincipalImpl
implements Group
An implementation of a Group.

Version:
$Id: GroupImpl.java,v 1.7 1997/05/20 19:17:02 mjr Exp $
Author:
Michael John Radwin
See Also:
Group

Variable Index

 o members

Constructor Index

 o GroupImpl(String)
Constructs a group with the specified name.

Method Index

 o addMember(Principal)
Adds the specified member to the group.
 o equals(Object)
Compares this group to the specified object.
 o isMember(Principal)
Returns true if the passed principal is a member of the group.
 o members()
Returns an enumeration of the members in the group.
 o removeMember(Principal)
Removes the specified member from the group.

Variables

 o members
 protected Vector members

Constructors

 o GroupImpl
 public GroupImpl(String name)
Constructs a group with the specified name.

Methods

 o addMember
 public boolean addMember(Principal user)
Adds the specified member to the group.

Parameters:
user - the principal to add to this group.
Returns:
true if the member was successfully added, false if the principal was already a member.
 o removeMember
 public boolean removeMember(Principal user)
Removes the specified member from the group.

Parameters:
user - the principal to remove from this group.
Returns:
true if the principal was removed, or false if the principal was not a member.
 o isMember
 public boolean isMember(Principal member)
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.

Parameters:
member - the principal whose membership is to be checked.
Returns:
true if the principal is a member of this group, false otherwise.
 o members
 public Enumeration members()
Returns an enumeration of the members in the group. The returned objects can be instances of either Principal or Group (which is a subclass of Principal).

Returns:
an enumeration of the group members.
 o equals
 public boolean equals(Object other)
Compares this group to the specified object. Returns true if the object passed in matches the group represented by the implementation of this interface.

Parameters:
other - the group to compare with.
Returns:
true if the group passed in is the same as that encapsulated by this group, false otherwise.
Overrides:
equals in class PrincipalImpl

All Packages  Class Hierarchy  This Package  Previous  Next  Index