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 aNumericUserPrincipalusing a long representation of the user's identification number (UID).NumericUserPrincipal(String name) Create aNumericUserPrincipalusing aStringrepresentation of the user's identification number (UID). -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares the specified Object with thisNumericUserPrincipalfor equality.getName()Return the user identification number (UID) for thisNumericUserPrincipal.inthashCode()Return a hash code for thisNumericUserPrincipal.longReturn the user identification number (UID) for thisNumericUserPrincipalas a long.toString()Return a string representation of thisNumericUserPrincipal.
-
Constructor Details
-
NumericUserPrincipal
Create aNumericUserPrincipalusing aStringrepresentation of the user's identification number (UID).- Parameters:
name- the user identification number (UID) for this user.- Throws:
NullPointerException- if thenameisnull.
-
NumericUserPrincipal
public NumericUserPrincipal(long name) Create aNumericUserPrincipalusing 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 thisNumericUserPrincipalas a long.- Returns:
- the user identification number (UID) for this
NumericUserPrincipalas a long.
-
toString
Return a string representation of thisNumericUserPrincipal. -
equals
Compares the specified Object with thisNumericUserPrincipalfor equality. Returns true if the given object is also aNumericUserPrincipaland the two NumericUserPrincipals have the same user identification number (UID). -
hashCode
public int hashCode()Return a hash code for thisNumericUserPrincipal.
-