当前页面:
在线文档首页 >
JBoss 4.0.1 sp1 server API Documentation 英文版文档
NobodyPrincipal (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档
org.jboss.security
Class NobodyPrincipal
java.lang.Object
org.jboss.security.NobodyPrincipal
- All Implemented Interfaces:
- Comparable, Principal
- public class NobodyPrincipal
- extends Object
- implements Comparable, Principal
An implementation of Principal and Comparable that represents no role.
Any Principal or name of a Principal when compared to an NobodyPrincipal
using equals
or compareTo
will always be found not equal to the NobodyPrincipal.
Note that this class is not likely to operate correctly in a collection
since the hashCode() and equals() methods are not correlated.
- Version:
- $Revision: 1.5 $
- Author:
- Scott.Stark@jboss.org
NOBODY
public static final String NOBODY
- See Also:
- Constant Field Values
NOBODY_PRINCIPAL
public static final NobodyPrincipal NOBODY_PRINCIPAL
NobodyPrincipal
public NobodyPrincipal()
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Principal
getName
public String getName()
- Specified by:
getName
in interface Principal
- Returns:
- ""
toString
public String toString()
- Specified by:
toString
in interface Principal
equals
public boolean equals(Object another)
- This method always returns 0 to indicate equality for any argument.
This is only meaningful when comparing against other Principal objects
or names of Principals.
- Specified by:
equals
in interface Principal
- Returns:
- false to indicate inequality for any argument.
compareTo
public int compareTo(Object o)
- This method always returns 1 to indicate inequality for any argument.
This is only meaningful when comparing against other Principal objects
or names of Principals.
- Specified by:
compareTo
in interface Comparable
- Returns:
- 1 to indicate inequality for any argument.
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.