An implementation of Principal and Comparable that represents any role.
Any Principal or name of a Principal when compared to an AnybodyPrincipal
using equals or compareTo
will always be found equals to the AnybodyPrincipal.
Note that this class is not likely to operate correctly in a collection
since the hashCode() and equals() methods are not correlated.
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 java.security.Principal
Overrides:
equals in class java.lang.Object
Returns:
true to indicate equality for any argument.
compareTo
public int compareTo(java.lang.Object o)
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.