Package com.sun.grid.security.login
Class UserPrincipal
java.lang.Object
com.sun.grid.security.login.UserPrincipal
- All Implemented Interfaces:
Serializable
,Principal
Generic principal for a logged in user.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
UserPrincipal
Create a UserPrincipal with a username.- Parameters:
name
- the username for this user.- Throws:
NullPointerException
- if thename
isnull
.
-
-
Method Details
-
getName
Return the username for thisUserPrincipal
. -
toString
Return a string representation of thisUserPrincipal
. -
equals
Compares the specified Object with thisUserPrincipal
for equality. Returns true if the given object is also aUserPrincipal
and the two UserPrincipals have the same username. -
hashCode
public int hashCode()Return a hash code for thisUserPrincipal
.
-