Class AnonymousPrincipal

    • Constructor Detail

      • AnonymousPrincipal

        public AnonymousPrincipal()
        Construct a new instance (should not be used; call getInstance() instead).
      • AnonymousPrincipal

        public AnonymousPrincipal​(String ignored)
        Construct a new instance (should not be used; call getInstance() instead).
        Parameters:
        ignored - ignored
    • Method Detail

      • getInstance

        public static AnonymousPrincipal getInstance()
        Get the anonymous principal instance.
        Returns:
        the anonymous principal instance
      • getName

        public String getName()
        Get the principal name (always "anonymous").
        Specified by:
        getName in interface Principal
        Returns:
        the principal name (always "anonymous")
      • equals

        public boolean equals​(Object o)
        Determine whether the given object is also an anonymous principal.
        Specified by:
        equals in interface Principal
        Overrides:
        equals in class Object
        Parameters:
        o - the other object
        Returns:
        true if the object is an anonymous principal, false otherwise
      • hashCode

        public int hashCode()
        Get the hash code of this principal.
        Specified by:
        hashCode in interface Principal
        Overrides:
        hashCode in class Object
        Returns:
        the hash code of this principal
      • toString

        public String toString()
        Get a representation of the principal name (always "anonymous").
        Specified by:
        toString in interface Principal
        Overrides:
        toString in class Object
        Returns:
        the string representation of the principal name (always "anonymous")
      • writeReplace

        Object writeReplace()
      • readResolve

        Object readResolve()