public class PrincipalImpl
extends java.lang.Object
implements java.security.Principal
| Constructor and Description |
|---|
PrincipalImpl(java.lang.String user)
Construct a principal from a string user name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object another)
This function returns true if the object passed matches
the principal represented in this implementation
|
java.lang.String |
getName()
return the name of the principal.
|
int |
hashCode()
return a hashcode for the principal.
|
java.lang.String |
toString()
Prints a stringified version of the principal.
|
public PrincipalImpl(java.lang.String user)
user - The string form of the principal name.public boolean equals(java.lang.Object another)
equals in interface java.security.Principalequals in class java.lang.Objectanother - the Principal to compare with.public java.lang.String toString()
toString in interface java.security.PrincipaltoString in class java.lang.Objectpublic int hashCode()
hashCode in interface java.security.PrincipalhashCode in class java.lang.Objectpublic java.lang.String getName()
getName in interface java.security.Principal