Package org.glassfish.security.common
Class PrincipalImpl
- java.lang.Object
-
- org.glassfish.security.common.PrincipalImpl
-
- All Implemented Interfaces:
Serializable
,Principal
- Direct Known Subclasses:
FileRealmStorageManager.User
,Group
,ResourcePrincipal
,Role
,WebPrincipal
public class PrincipalImpl extends Object implements Principal, Serializable
This class implements the principal interface.- Author:
- Harish Prabandham
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PrincipalImpl(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(Object another)
This function returns true if the object passed matches the principal represented in this implementationString
getName()
Gets the name of the Principal as a java.lang.Stringint
hashCode()
Returns the hashcode for this Principal objectString
toString()
Prints a stringified version of the principal.
-
-
-
Constructor Detail
-
PrincipalImpl
public PrincipalImpl(String user)
Construct a principal from a string user name.- Parameters:
user
- The string form of the principal name.
-
-
Method Detail
-
equals
public boolean equals(Object another)
This function returns true if the object passed matches the principal represented in this implementation
-
toString
public String toString()
Prints a stringified version of the principal.
-
hashCode
public int hashCode()
Returns the hashcode for this Principal object
-
-