Package com.globalmentor.security
Class AbstractPrincipal
- java.lang.Object
-
- com.globalmentor.model.DefaultIDed<java.lang.String>
-
- com.globalmentor.security.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 com.globalmentor.model.DefaultIDed
getID, hashCode, setID, toString
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfacejava.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 interfacejava.security.Principal
- Overrides:
equals
in classDefaultIDed<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()
-
-