Package com.sun.grid.security.login
Class NumericUserPrincipal
java.lang.Object
com.sun.grid.security.login.NumericUserPrincipal
- All Implemented Interfaces:
Serializable
,Principal
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNumericUserPrincipal
(long name) Create aNumericUserPrincipal
using a long representation of the user's identification number (UID).NumericUserPrincipal
(String name) Create aNumericUserPrincipal
using aString
representation of the user's identification number (UID). -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the specified Object with thisNumericUserPrincipal
for equality.getName()
Return the user identification number (UID) for thisNumericUserPrincipal
.int
hashCode()
Return a hash code for thisNumericUserPrincipal
.long
Return the user identification number (UID) for thisNumericUserPrincipal
as a long.toString()
Return a string representation of thisNumericUserPrincipal
.
-
Constructor Details
-
NumericUserPrincipal
Create aNumericUserPrincipal
using aString
representation of the user's identification number (UID).- Parameters:
name
- the user identification number (UID) for this user.- Throws:
NullPointerException
- if thename
isnull
.
-
NumericUserPrincipal
public NumericUserPrincipal(long name) Create aNumericUserPrincipal
using a long representation of the user's identification number (UID).- Parameters:
name
- the user identification number (UID) for this user represented as a long.
-
-
Method Details
-
getName
Return the user identification number (UID) for thisNumericUserPrincipal
. -
longValue
public long longValue()Return the user identification number (UID) for thisNumericUserPrincipal
as a long.- Returns:
- the user identification number (UID) for this
NumericUserPrincipal
as a long.
-
toString
Return a string representation of thisNumericUserPrincipal
. -
equals
Compares the specified Object with thisNumericUserPrincipal
for equality. Returns true if the given object is also aNumericUserPrincipal
and the two NumericUserPrincipals have the same user identification number (UID). -
hashCode
public int hashCode()Return a hash code for thisNumericUserPrincipal
.
-