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.Principal
equals
in class java.lang.Object
another
- the Principal to compare with.public java.lang.String toString()
toString
in interface java.security.Principal
toString
in class java.lang.Object
public int hashCode()
hashCode
in interface java.security.Principal
hashCode
in class java.lang.Object
public java.lang.String getName()
getName
in interface java.security.Principal