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 aGroupPrincipalusing a user's group name.GroupPrincipal(String name, boolean primaryGroup) Create aGroupPrincipalusing aStringrepresentation of the user's group name. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares the specified Object with thisNumericGroupPrincipalfor equality.getName()Return the user's group name for thisGroupPrincipal.inthashCode()Return a hash code for thisNumericGroupPrincipal.booleanReturn whether this group represents the primary group to which this user belongs.toString()Return a string representation of thisNumericGroupPrincipal.
-
Constructor Details
-
GroupPrincipal
Create aGroupPrincipalusing aStringrepresentation 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 thenameisnull.
-
GroupPrincipal
public GroupPrincipal(long name, boolean primaryGroup) Create aGroupPrincipalusing 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 thisNumericGroupPrincipalfor equality. Returns true if the given object is also aNumericGroupPrincipaland the two NumericGroupPrincipals have the same group identification number (GID). -
hashCode
public int hashCode()Return a hash code for thisNumericGroupPrincipal.
-