Class NamePrincipal

    • Constructor Detail

      • NamePrincipal

        public NamePrincipal​(String name)
        Construct a new instance.
        Parameters:
        name - the principal name
    • Method Detail

      • getName

        public String getName()
        Get the principal name.
        Specified by:
        getName in interface Principal
        Returns:
        the principal name
      • 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
      • equals

        public boolean equals​(Object obj)
        Determine whether this principal is equal to the given object.
        Specified by:
        equals in interface Principal
        Overrides:
        equals in class Object
        Parameters:
        obj - the object
        Returns:
        true if they are equal, false otherwise
      • equals

        public boolean equals​(NamePrincipal obj)
        Determine whether this principal is equal to the given object.
        Parameters:
        obj - the object
        Returns:
        true if they are equal, false otherwise
      • toString

        public String toString()
        Get a string representation of this principal.
        Specified by:
        toString in interface Principal
        Overrides:
        toString in class Object
        Returns:
        the string representation of this principal