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.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
From interface
java.security.Principal
abstract
boolean
|
equals(Object another)
Compares this principal to the specified object.
|
abstract
String
|
getName()
Returns the name of this principal.
|
abstract
int
|
hashCode()
Returns a hashcode for this principal.
|
abstract
String
|
toString()
Returns a string representation of this 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
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.