Class UserPrincipal
- java.lang.Object
-
- com.sun.identity.authentication.service.UserPrincipal
-
- All Implemented Interfaces:
Serializable,Principal
public class UserPrincipal extends Object implements Principal, Serializable
This class represents the abstract notion of a user which can be used to represent any entity, such as an individual, a corporation, and a login id.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserPrincipal(String name)CreatesUserPrincipalobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Compares the specified Object with thisLDAPPrincipalfor equality.StringgetName()Return the user name for thisUserPrincipal.inthashCode()Returns a hash code for thisUserPrincipal.StringtoString()Returns a string representation of thisUserPrincipal.
-
-
-
Constructor Detail
-
UserPrincipal
public UserPrincipal(String name)
CreatesUserPrincipalobject.- Parameters:
name- representing pricipal for user.
-
-
Method Detail
-
getName
public String getName()
Return the user name for thisUserPrincipal.
-
toString
public String toString()
Returns a string representation of thisUserPrincipal.
-
equals
public boolean equals(Object o)
Compares the specified Object with thisLDAPPrincipalfor equality. Returnstrueif the given object is also aLDAPPrincipaland the twoLDAPPrincipals have the same user name.
-
-