com.sun.grid.security.login
public class NumericGroupPrincipal extends java.lang.Object implements java.security.Principal, java.io.Serializable
Prinicipal
indentifing a group users. The name of
the group is the group id.Constructor and Description |
---|
NumericGroupPrincipal(long name,
boolean primaryGroup)
Create a
NumericGroupPrincipal using a
long representation of the user's group identification number (GID). |
NumericGroupPrincipal(java.lang.String name,
boolean primaryGroup)
Create a
NumericGroupPrincipal using a
String representation of the user's
group identification number (GID). |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares the specified Object with this
NumericGroupPrincipal
for equality. |
java.lang.String |
getName()
Return the user's group identification number (GID) for this
NumericGroupPrincipal . |
int |
hashCode()
Return a hash code for this
NumericGroupPrincipal . |
boolean |
isPrimaryGroup()
Return whether this group identification number (GID) represents
the primary group to which this user belongs.
|
long |
longValue()
Return the user's group identification number (GID) for this
NumericGroupPrincipal as a long. |
java.lang.String |
toString()
Return a string representation of this
NumericGroupPrincipal . |
public NumericGroupPrincipal(java.lang.String name, boolean primaryGroup)
NumericGroupPrincipal
using a
String
representation of the user's
group identification number (GID).
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.java.lang.NullPointerException
- if the name
is null
.public NumericGroupPrincipal(long name, boolean primaryGroup)
NumericGroupPrincipal
using a
long representation of the user's group identification number (GID).
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.public java.lang.String getName()
NumericGroupPrincipal
.
getName
in interface java.security.Principal
NumericGroupPrincipal
public long longValue()
NumericGroupPrincipal
as a long.
NumericGroupPrincipal
as a long.public boolean isPrimaryGroup()
public java.lang.String toString()
NumericGroupPrincipal
.
toString
in interface java.security.Principal
toString
in class java.lang.Object
NumericGroupPrincipal
.public boolean equals(java.lang.Object o)
NumericGroupPrincipal
for equality. Returns true if the given object is also a
NumericGroupPrincipal
and the two
NumericGroupPrincipals
have the same group identification number (GID).
equals
in interface java.security.Principal
equals
in class java.lang.Object
o
- Object to be compared for equality with this
NumericGroupPrincipal
.NumericGroupPrincipal
.public int hashCode()
NumericGroupPrincipal
.
hashCode
in interface java.security.Principal
hashCode
in class java.lang.Object
NumericGroupPrincipal
.