Package netscape.security.acl
Class PrincipalImpl
- java.lang.Object
-
- netscape.security.acl.PrincipalImpl
-
- All Implemented Interfaces:
java.security.Principal
public class PrincipalImpl extends java.lang.Object implements java.security.Principal
This class implements the principal interface.- Author:
- Satish Dharmaraj
-
-
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 boolean
equals(java.lang.Object another)
This function returns true if the object passed matches the principal represented in this implementationjava.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.
-
-
-
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:
equals
in interfacejava.security.Principal
- Overrides:
equals
in 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:
toString
in interfacejava.security.Principal
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
return a hashcode for the principal.- Specified by:
hashCode
in interfacejava.security.Principal
- Overrides:
hashCode
in classjava.lang.Object
-
getName
public java.lang.String getName()
return the name of the principal.- Specified by:
getName
in interfacejava.security.Principal
-
-