com.sun.grid.security.login
public class NumericUserPrincipal extends java.lang.Object implements java.security.Principal, java.io.Serializable
Constructor and Description |
---|
NumericUserPrincipal(long name)
Create a
NumericUserPrincipal using a
long representation of the user's identification number (UID). |
NumericUserPrincipal(java.lang.String name)
Create a
NumericUserPrincipal using a
String representation of the
user's identification number (UID). |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares the specified Object with this
NumericUserPrincipal
for equality. |
java.lang.String |
getName()
Return the user identification number (UID) for this
NumericUserPrincipal . |
int |
hashCode()
Return a hash code for this
NumericUserPrincipal . |
long |
longValue()
Return the user identification number (UID) for this
NumericUserPrincipal as a long. |
java.lang.String |
toString()
Return a string representation of this
NumericUserPrincipal . |
public NumericUserPrincipal(java.lang.String name)
NumericUserPrincipal
using a
String
representation of the
user's identification number (UID).
name
- the user identification number (UID) for this user.java.lang.NullPointerException
- if the name
is null
.public NumericUserPrincipal(long name)
NumericUserPrincipal
using a
long representation of the user's identification number (UID).
name
- the user identification number (UID) for this user
represented as a long.public java.lang.String getName()
NumericUserPrincipal
.
getName
in interface java.security.Principal
NumericUserPrincipal
public long longValue()
NumericUserPrincipal
as a long.
NumericUserPrincipal
as a long.public java.lang.String toString()
NumericUserPrincipal
.
toString
in interface java.security.Principal
toString
in class java.lang.Object
NumericUserPrincipal
.public boolean equals(java.lang.Object o)
NumericUserPrincipal
for equality. Returns true if the given object is also a
NumericUserPrincipal
and the two
NumericUserPrincipals
have the same user identification number (UID).
equals
in interface java.security.Principal
equals
in class java.lang.Object
o
- Object to be compared for equality with this
NumericUserPrincipal
.NumericUserPrincipal
.public int hashCode()
NumericUserPrincipal
.
hashCode
in interface java.security.Principal
hashCode
in class java.lang.Object
NumericUserPrincipal
.