org.securityfilter.realm
Class SimplePrincipal

java.lang.Object
  extended byorg.securityfilter.realm.SimplePrincipal
All Implemented Interfaces:
Principal, Serializable

public class SimplePrincipal
extends Object
implements Principal, Serializable

SimplePrincipal - a simple, serializable Principal.

Version:
$Revision: 1.1 $ $Date: 2004/07/03 20:53:44 $
Author:
Max Cooper (max@maxcooper.com)
See Also:
Serialized Form

Constructor Summary
SimplePrincipal(String name)
          Constructor
 
Method Summary
 boolean equals(Object obj)
          Compares this principal to the specified object.
 String getName()
          Returns the name of this principal.
 int hashCode()
          Returns a hashcode for this principal.
 String toString()
          Returns a string representation of this principal.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimplePrincipal

public SimplePrincipal(String name)
Constructor

Method Detail

getName

public String getName()
Returns the name of this principal.

Specified by:
getName in interface Principal
Returns:
the name of this principal.

equals

public boolean equals(Object obj)
Compares this principal to the specified object.

Specified by:
equals in interface Principal
Parameters:
obj - object to compare with.
Returns:
true if the object passed in is a SimplePrincipal with the same name.

toString

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

Specified by:
toString in interface Principal
Returns:
a string representation of this principal.

hashCode

public int hashCode()
Returns a hashcode for this principal.

Specified by:
hashCode in interface Principal
Returns:
a hashcode for this principal.