Package java.security

Interface Principal

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean equals​(Object obj)
      Compares the specified object with this Principal for equality and returns true if the specified object is equal, false otherwise.
      String getName()
      Returns the name of this Principal.
      int hashCode()
      Returns the hash code value for this Principal.
      String toString()
      Returns a string containing a concise, human-readable description of this Principal.
    • Method Detail

      • equals

        boolean equals​(Object obj)
        Compares the specified object with this Principal for equality and returns true if the specified object is equal, false otherwise.
        Overrides:
        equals in class Object
        Parameters:
        obj - object to be compared for equality with this Principal.
        Returns:
        true if the specified object is equal to this Principal, otherwise false.
        See Also:
        Object.hashCode()
      • getName

        String getName()
        Returns the name of this Principal.
        Returns:
        the name of this Principal.
      • hashCode

        int hashCode()
        Returns the hash code value for this Principal. Returns the same hash code for Principals that are equal to each other as required by the general contract of Object.hashCode().
        Overrides:
        hashCode in class Object
        Returns:
        the hash code value for this Principal.
        See Also:
        Object.equals(Object), equals(Object)
      • toString

        String toString()
        Returns a string containing a concise, human-readable description of this Principal.
        Overrides:
        toString in class Object
        Returns:
        a printable representation for this Principal.