Package com.sun.grid.security.login
Class GroupPrincipal
java.lang.Object
com.sun.grid.security.login.GroupPrincipal
- All Implemented Interfaces:
Serializable
,Principal
Generic
Principal
represent a group of users- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGroupPrincipal
(long name, boolean primaryGroup) Create aGroupPrincipal
using a user's group name.GroupPrincipal
(String name, boolean primaryGroup) Create aGroupPrincipal
using aString
representation of the user's group name. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the specified Object with thisNumericGroupPrincipal
for equality.getName()
Return the user's group name for thisGroupPrincipal
.int
hashCode()
Return a hash code for thisNumericGroupPrincipal
.boolean
Return whether this group represents the primary group to which this user belongs.toString()
Return a string representation of thisNumericGroupPrincipal
.
-
Constructor Details
-
GroupPrincipal
Create aGroupPrincipal
using aString
representation of the user's group name.- Parameters:
name
- the user's groupprimaryGroup
- true if the specified group represents the primary group to which this user belongs.- Throws:
NullPointerException
- if thename
isnull
.
-
GroupPrincipal
public GroupPrincipal(long name, boolean primaryGroup) Create aGroupPrincipal
using a user's group name.- Parameters:
name
- the user's groupprimaryGroup
- true if the specified group represents the primary group to which this user belongs.
-
-
Method Details
-
getName
Return the user's group name for thisGroupPrincipal
. -
isPrimaryGroup
public boolean isPrimaryGroup()Return whether this group represents the primary group to which this user belongs.- Returns:
- true if this name of the group represents the primary group to which this user belongs, or false otherwise.
-
toString
Return a string representation of thisNumericGroupPrincipal
. -
equals
Compares the specified Object with thisNumericGroupPrincipal
for equality. Returns true if the given object is also aNumericGroupPrincipal
and the two NumericGroupPrincipals have the same group identification number (GID). -
hashCode
public int hashCode()Return a hash code for thisNumericGroupPrincipal
.
-