com.sun.jndi.ldap.obj
Class LdapPrincipal

java.lang.Object
  extended by com.sun.jndi.ldap.obj.LdapPrincipal
All Implemented Interfaces:
java.security.Principal

 class LdapPrincipal
extends java.lang.Object
implements java.security.Principal

A principal from the LDAP directory.

Author:
Vincent Ryan

Field Summary
private  int hash
           
private  com.sun.jndi.ldap.LdapName ldapName
           
private  java.lang.String name
           
 
Constructor Summary
LdapPrincipal(java.lang.String name)
          Create a principal.
 
Method Summary
 boolean equals(java.lang.Object object)
          Compares this principal to the specified object.
private  com.sun.jndi.ldap.LdapName getLdapName(java.lang.String name)
           
 java.lang.String getName()
          Returns the name of this principal.
 int hashCode()
          Returns a hash code for this principal.
 java.lang.String toString()
          Returns a string representation of this principal.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ldapName

private com.sun.jndi.ldap.LdapName ldapName

hash

private int hash

name

private java.lang.String name
Constructor Detail

LdapPrincipal

public LdapPrincipal(java.lang.String name)
Create a principal.

Parameters:
name - The principal's string name.
Method Detail

equals

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

Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object
Parameters:
object - The object to compare this principal against.
Returns:
true if they are equal; false otherwise.

hashCode

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

Specified by:
hashCode in interface java.security.Principal
Overrides:
hashCode in class java.lang.Object
Returns:
The principal's hash code.

getName

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

Specified by:
getName in interface java.security.Principal
Returns:
String The principal's string name.

toString

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

Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object
Returns:
String The principal's string name.

getLdapName

private com.sun.jndi.ldap.LdapName getLdapName(java.lang.String name)