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

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

public class PrincipalImpl
extends Object
implements JackrabbitPrincipal, Serializable

Base class for implementations of JackrabbitPrincipal.

See Also:
Serialized Form

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

Constructor Detail

PrincipalImpl

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

Parameters:
name - the name of this principal
Method Detail

getName

public String getName()

Specified by:
getName in interface Principal

equals

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

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

hashCode

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

toString

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


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.