org.apache.jackrabbit.core.security.principal
Class PrincipalImpl

java.lang.Object
  extended by org.apache.jackrabbit.core.security.principal.PrincipalImpl
All Implemented Interfaces:
java.io.Serializable, java.security.Principal, JackrabbitPrincipal

public class PrincipalImpl
extends java.lang.Object
implements JackrabbitPrincipal, java.io.Serializable

Base class for implementations of JackrabbitPrincipal.

See Also:
Serialized Form

Constructor Summary
PrincipalImpl(java.lang.String name)
          Creates a new principal with the given name.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Two principals are equal, if their names are.
 java.lang.String getName()
          
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrincipalImpl

public PrincipalImpl(java.lang.String name)
Creates a new principal with the given name.

Parameters:
name - the name of this principal
Method Detail

getName

public java.lang.String getName()

Specified by:
getName in interface java.security.Principal

equals

public boolean equals(java.lang.Object obj)
Two principals are equal, if their names are.

Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Specified by:
hashCode in interface java.security.Principal
Overrides:
hashCode in class java.lang.Object
Returns:
the hash code of the principals name.
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.