Package com.sun.grid.security.login
Class NumericUserPrincipal
- java.lang.Object
-
- com.sun.grid.security.login.NumericUserPrincipal
-
- All Implemented Interfaces:
java.io.Serializable,java.security.Principal
public class NumericUserPrincipal extends java.lang.Object implements java.security.Principal, java.io.Serializable- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NumericUserPrincipal(long name)Create aNumericUserPrincipalusing a long representation of the user's identification number (UID).NumericUserPrincipal(java.lang.String name)Create aNumericUserPrincipalusing aStringrepresentation of the user's identification number (UID).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Compares the specified Object with thisNumericUserPrincipalfor equality.java.lang.StringgetName()Return the user identification number (UID) for thisNumericUserPrincipal.inthashCode()Return a hash code for thisNumericUserPrincipal.longlongValue()Return the user identification number (UID) for thisNumericUserPrincipalas a long.java.lang.StringtoString()Return a string representation of thisNumericUserPrincipal.
-
-
-
Constructor Detail
-
NumericUserPrincipal
public NumericUserPrincipal(java.lang.String name)
Create aNumericUserPrincipalusing aStringrepresentation of the user's identification number (UID).- Parameters:
name- the user identification number (UID) for this user.- Throws:
java.lang.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 Detail
-
getName
public java.lang.String getName()
Return the user identification number (UID) for thisNumericUserPrincipal.- Specified by:
getNamein interfacejava.security.Principal- Returns:
- the user identification number (UID) for this
NumericUserPrincipal
-
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
public java.lang.String toString()
Return a string representation of thisNumericUserPrincipal.- Specified by:
toStringin interfacejava.security.Principal- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of this
NumericUserPrincipal.
-
equals
public boolean equals(java.lang.Object o)
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).- Specified by:
equalsin interfacejava.security.Principal- Overrides:
equalsin classjava.lang.Object- Parameters:
o- Object to be compared for equality with thisNumericUserPrincipal.- Returns:
- true if the specified Object is equal equal to this
NumericUserPrincipal.
-
hashCode
public int hashCode()
Return a hash code for thisNumericUserPrincipal.- Specified by:
hashCodein interfacejava.security.Principal- Overrides:
hashCodein classjava.lang.Object- Returns:
- a hash code for this
NumericUserPrincipal.
-
-