public class

GroupImpl

extends Object
implements Group
java.lang.Object
   ↳ sun.security.acl.GroupImpl
Known Direct Subclasses

Class Overview

This class implements a group of principals.

Summary

Public Constructors
GroupImpl(String groupName)
Constructs a Group object with no members.
Public Methods
boolean addMember(Principal user)
adds the specified member to the group.
boolean equals(Group another)
boolean equals(Object obj)
This function returns true if the group passed matches the group represented in this interface.
String getName()
return the name of the principal.
int hashCode()
return a hashcode for the principal.
boolean isMember(Principal member)
returns true if the passed principal is a member of the group.
Enumeration<? extends Principal> members()
returns the enumeration of the members in the group.
boolean removeMember(Principal user)
removes the specified member from the group.
String toString()
Prints a stringified version of the group.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.security.Principal
From interface java.security.acl.Group

Public Constructors

public GroupImpl (String groupName)

Constructs a Group object with no members.

Parameters
groupName the name of the group

Public Methods

public boolean addMember (Principal user)

adds the specified member to the group.

Parameters
user The principal to add to the group.
Returns
  • true if the member was added - false if the member could not be added.

public boolean equals (Group another)

public boolean equals (Object obj)

This function returns true if the group passed matches the group represented in this interface.

Parameters
obj the reference object with which to compare.
Returns
  • true if this object is the same as the obj argument; false otherwise.

public String getName ()

return the name of the principal.

Returns
  • the name of this principal.

public int hashCode ()

return a hashcode for the principal.

Returns
  • a hash code value for this object.

public boolean isMember (Principal member)

returns true if the passed principal is a member of the group.

Parameters
member The principal whose membership must be checked for.
Returns
  • true if the principal is a member of this group, false otherwise

public Enumeration<? extends Principal> members ()

returns the enumeration of the members in the group.

Returns
  • an enumeration of the group members.

public boolean removeMember (Principal user)

removes the specified member from the group.

Parameters
user The principal to remove from the group.
Returns
  • true if the principal was removed, or false if the principal was not a member.

public String toString ()

Prints a stringified version of the group.

Returns
  • a string representation of the object.