Class PrincipalImpl
- java.lang.Object
-
- org.mozilla.jss.netscape.security.acl.PrincipalImpl
-
- All Implemented Interfaces:
java.security.Principal
public class PrincipalImpl extends java.lang.Object implements java.security.PrincipalThis class implements the principal interface.
-
-
Constructor Summary
Constructors Constructor Description PrincipalImpl(java.lang.String user)Construct a principal from a string user name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object another)This function returns true if the object passed matches the principal represented in this implementationjava.lang.StringgetName()return the name of the principal.inthashCode()return a hashcode for the principal.java.lang.StringtoString()Prints a stringified version of the principal.
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object another)
This function returns true if the object passed matches the principal represented in this implementation- Specified by:
equalsin interfacejava.security.Principal- Overrides:
equalsin classjava.lang.Object- Parameters:
another- the Principal to compare with.- Returns:
- true if the Principal passed is the same as that encapsulated in this object, false otherwise
-
toString
public java.lang.String toString()
Prints a stringified version of the principal.- Specified by:
toStringin interfacejava.security.Principal- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
return a hashcode for the principal.- Specified by:
hashCodein interfacejava.security.Principal- Overrides:
hashCodein classjava.lang.Object
-
getName
public java.lang.String getName()
return the name of the principal.- Specified by:
getNamein interfacejava.security.Principal
-
-