com.hs.mail.security
Class BasicPrincipal

java.lang.Object
  extended by com.hs.mail.security.BasicPrincipal
All Implemented Interfaces:
Principal
Direct Known Subclasses:
RolePrincipal, UserPrincipal

public class BasicPrincipal
extends Object
implements Principal

A basic implementation of the Principal interface.

Since:
Jul 18, 2007
Author:
Won Chul Doh

Constructor Summary
BasicPrincipal(String name)
          Initializes the principal with the given name
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
          Retrieves the name of the principal
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicPrincipal

public BasicPrincipal(String name)
Initializes the principal with the given name

Parameters:
name - The given name
Method Detail

getName

public String getName()
Retrieves the name of the principal

Specified by:
getName in interface Principal

equals

public boolean equals(Object obj)
Specified by:
equals in interface Principal
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object

toString

public String toString()
Specified by:
toString in interface Principal
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.