Class AnybodyPrincipal

  • All Implemented Interfaces:
    Comparable<Object>, Principal

    public class AnybodyPrincipal
    extends Object
    implements Comparable<Object>, Principal
    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.
    Version:
    $Revision$
    Author:
    Scott.Stark@jboss.org
    • Constructor Detail

      • AnybodyPrincipal

        public AnybodyPrincipal()
    • Method Detail

      • 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
        Overrides:
        equals in class Object
        Returns:
        true to indicate equality for any argument.
      • compareTo

        public int compareTo​(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.
        Specified by:
        compareTo in interface Comparable<Object>
        Returns:
        0 to indicate equality for any argument.