| |
|
| java.lang.Object de.danet.an.util.SimplePrincipal
SimplePrincipal | public class SimplePrincipal implements Principal,Serializable(Code) | | This class provides a very simple implementation of the interface
Principal . The only known attribute is the principal's
name.
author: Michael N. Lipp version: $Revision: 1.2 $ |
Constructor Summary | |
public | SimplePrincipal(String pn) Creates an instance of SimplePrincipal
with all attributes initialized to the given values. |
Method Summary | |
public boolean | equals(Object object) SimplePrincipal considers all principals with the
same name as equal.
Parameters: object - another principal. | public String | getName() Returns the principal's name. | public int | hashCode() Simply return the name's hash code. | public String | toString() Simply return the principal's name. |
SimplePrincipal | public SimplePrincipal(String pn)(Code) | | Creates an instance of SimplePrincipal
with all attributes initialized to the given values.
Parameters: pn - the principal's name. |
equals | public boolean equals(Object object)(Code) | | SimplePrincipal considers all principals with the
same name as equal.
Parameters: object - another principal. a boolean value |
getName | public String getName()(Code) | | Returns the principal's name.
a String value |
hashCode | public int hashCode()(Code) | | Simply return the name's hash code.
an int value |
toString | public String toString()(Code) | | Simply return the principal's name.
a String value |
|
|
|