IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.security.plugins.builtins
Class SimpleUserPrincipal

java.lang.Object
  extended by com.ibm.websphere.objectgrid.security.plugins.builtins.SimpleUserPrincipal
All Implemented Interfaces:
Serializable, Principal

public class SimpleUserPrincipal
extends Object
implements Principal, Serializable

This class implements the Principal interface and represents a simple user.

Since:
WAS XD 6.0.1
See Also:
Principal, Subject, Serialized Form

Constructor Summary
SimpleUserPrincipal(String _name)
          Creates a SimpleUserPrincipal with a user name.
 
Method Summary
 boolean equals(Object o)
          Compares the specified Object with this SimpleUserPrincipal for equality.
 String getName()
          Gets the user name for this SimpleUserPrincipal.
 int hashCode()
          Returns a hash code for this SimpleUserPrincipal.
 String toString()
          Returns a string representation of this SimpleUserPrincipal.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleUserPrincipal

public SimpleUserPrincipal(String _name)
Creates a SimpleUserPrincipal with a user name.

Parameters:
_name - the user name for this user.
Throws:
IllegalArgumentException - if the name is null.
Method Detail

getName

public String getName()
Gets the user name for this SimpleUserPrincipal.

Specified by:
getName in interface Principal
Returns:
the user name for this SimpleUserPrincipal

toString

public String toString()
Returns a string representation of this SimpleUserPrincipal.

Specified by:
toString in interface Principal
Overrides:
toString in class Object
Returns:
a string representation of this SimpleUserPrincipal.

equals

public boolean equals(Object o)
Compares the specified Object with this SimpleUserPrincipal for equality.

Returns true if the given object is also a SimpleUserPrincipal and the two SimpleUserPrincipals have the same user names.

Specified by:
equals in interface Principal
Overrides:
equals in class Object
Parameters:
o - Object to be compared for equality with this SimpleUserPrincipal.
Returns:
true if the specified Object is equal to this SimpleUserPrincipal.

hashCode

public int hashCode()
Returns a hash code for this SimpleUserPrincipal.

Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object
Returns:
a hash code for this SimpleUserPrincipal.

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.