public interface java.security
Principal


Show All Login
Java SE 6
  
Implemented by: Group, Identity, JMXPrincipal, KerberosPrincipal, X500Principal
Details
This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.
version1.23, 05/11/17
See also java.security.cert.X509Certificate

Methods
public boolean equals(Object another) Details
Compares this principal to the specified object. Returns true if the object passed in matches the principal represented by the implementation of this interface.
anotherprincipal to compare with.
returntrue if the principal passed in is the same as that encapsulated by this principal, and false otherwise.
public int hashCode() Details
Returns a hashcode for this principal.
returna hashcode for this principal.
public String toString() Details
Returns a string representation of this principal.
returna string representation of this principal.

Properties
public String getName() Details
Returns the name of this principal.
returnthe name of this principal.