Class AbstractPrincipal

  • All Implemented Interfaces:
    IDed<java.lang.String>, java.security.Principal

    public abstract class AbstractPrincipal
    extends DefaultIDed<java.lang.String>
    implements java.security.Principal
    An abstract implementation of a principal.
    Author:
    Garret Wilson
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractPrincipal​(java.lang.String name)
      Constructor specifying the principal name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object object)
      Determines if the object is another principal with the same ID.
      java.lang.String getName()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.security.Principal

        hashCode, implies, toString
    • Constructor Detail

      • AbstractPrincipal

        public AbstractPrincipal​(java.lang.String name)
        Constructor specifying the principal name.
        Parameters:
        name - The name of the principal.
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface java.security.Principal
        Returns:
        The name of user as a principal.
        See Also:
        DefaultIDed.getID()
      • equals

        public boolean equals​(java.lang.Object object)
        Determines if the object is another principal with the same ID.
        Specified by:
        equals in interface java.security.Principal
        Overrides:
        equals in class DefaultIDed<java.lang.String>
        Parameters:
        object - The object with which to compare this object.
        Returns:
        true if the object is a principal with the same ID.
        See Also:
        DefaultIDed.getID()