Class EnilinkPrincipal

    • Constructor Detail

      • EnilinkPrincipal

        public EnilinkPrincipal​(net.enilink.komma.core.URI id)
        Creates a principal.
        Parameters:
        id - The principal's id.
        Throws:
        NullPointerException - If the id is null.
    • Method Detail

      • equals

        public boolean equals​(Object object)
        Compares this principal to the specified object.
        Specified by:
        equals in interface Principal
        Overrides:
        equals in class Object
        Parameters:
        object - The object to compare this principal against.
        Returns:
        true if they are equal; false otherwise.
      • hashCode

        public int hashCode()
        Returns a hash code for this principal.
        Specified by:
        hashCode in interface Principal
        Overrides:
        hashCode in class Object
        Returns:
        The principal's hash code.
      • getId

        public net.enilink.komma.core.URI getId()
        Returns the id of this principal.
        Returns:
        The principal's id.
      • getName

        public String getName()
        Returns the name of this principal.
        Specified by:
        getName in interface Principal
        Returns:
        The principal's name.
      • toString

        public String toString()
        Returns a string representation of this principal.
        Specified by:
        toString in interface Principal
        Overrides:
        toString in class Object
        Returns:
        The principal's name.