Package com.sun.grid.security.login
Class NumericGroupPrincipal
java.lang.Object
com.sun.grid.security.login.NumericGroupPrincipal
- All Implemented Interfaces:
Serializable
,Principal
Prinicipal
indentifing a group users. The name of
the group is the group id.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNumericGroupPrincipal
(long name, boolean primaryGroup) Create aNumericGroupPrincipal
using a long representation of the user's group identification number (GID).NumericGroupPrincipal
(String name, boolean primaryGroup) Create aNumericGroupPrincipal
using aString
representation of the user's group identification number (GID). -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the specified Object with thisNumericGroupPrincipal
for equality.getName()
Return the user's group identification number (GID) for thisNumericGroupPrincipal
.int
hashCode()
Return a hash code for thisNumericGroupPrincipal
.boolean
Return whether this group identification number (GID) represents the primary group to which this user belongs.long
Return the user's group identification number (GID) for thisNumericGroupPrincipal
as a long.toString()
Return a string representation of thisNumericGroupPrincipal
.
-
Constructor Details
-
NumericGroupPrincipal
Create aNumericGroupPrincipal
using aString
representation of the user's group identification number (GID).- Parameters:
name
- the user's group identification number (GID) for this user.primaryGroup
- true if the specified GID represents the primary group to which this user belongs.- Throws:
NullPointerException
- if thename
isnull
.
-
NumericGroupPrincipal
public NumericGroupPrincipal(long name, boolean primaryGroup) Create aNumericGroupPrincipal
using a long representation of the user's group identification number (GID).- Parameters:
name
- the user's group identification number (GID) for this user represented as a long.primaryGroup
- true if the specified GID represents the primary group to which this user belongs.
-
-
Method Details
-
getName
Return the user's group identification number (GID) for thisNumericGroupPrincipal
. -
longValue
public long longValue()Return the user's group identification number (GID) for thisNumericGroupPrincipal
as a long.- Returns:
- the user's group identification number (GID) for this
NumericGroupPrincipal
as a long.
-
isPrimaryGroup
public boolean isPrimaryGroup()Return whether this group identification number (GID) represents the primary group to which this user belongs.- Returns:
- true if this group identification number (GID) 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
.
-