GroupPrincipal
, UserPrincipal
HttpPrincipal
, Identity
, IdentityScope
, JMXPrincipal
, KerberosPrincipal
, LdapPrincipal
, NTDomainPrincipal
, NTSid
, NTSidDomainPrincipal
, NTSidGroupPrincipal
, NTSidPrimaryGroupPrincipal
, NTSidUserPrincipal
, NTUserPrincipal
, Signer
, UnixNumericGroupPrincipal
, UnixNumericUserPrincipal
, UnixPrincipal
, UserPrincipal
, X500Principal
public interface Principal
Principal
, which can be used to represent any entity, such as an individual, a corporation, and a login id.Modifier and Type | Method | Description |
---|---|---|
boolean |
equals |
Compares this Principal to the specified object. |
String |
getName() |
Returns the name of this Principal . |
int |
hashCode() |
Returns a hashcode for this Principal . |
default boolean |
implies |
Returns true if the specified subject is implied by this Principal . |
String |
toString() |
Returns a string representation of this Principal . |
boolean equals(Object another)
Principal
to the specified object. Returns true
if the object passed in matches the Principal
represented by the implementation of this interface.String toString()
Principal
.int hashCode()
Principal
.String getName()
Principal
.Principal
.default boolean implies(Subject subject)
true
if the specified subject is implied by this Principal
.true
if subject
is non-null and contains at least one Principal
that is equal to this Principal
. Subclasses may override this with a different implementation, if necessary.
subject
- the Subject
true
if subject
is non-null and is implied by this Principal
, or false otherwise.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/security/Principal.html