public interface

Principal

java.security.Principal
Known Indirect Subclasses

Class Overview

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.

See Also

Summary

Public Methods
abstract boolean equals(Object another)
Compares this principal to the specified object.
abstract String getName()
Returns the name of this principal.
abstract int hashCode()
Returns a hashcode for this principal.
abstract String toString()
Returns a string representation of this principal.

Public Methods

public abstract boolean equals (Object another)

Compares this principal to the specified object. Returns true if the object passed in matches the principal represented by the implementation of this interface.

Parameters
another principal to compare with.
Returns
  • true if the principal passed in is the same as that encapsulated by this principal, and false otherwise.

public abstract String getName ()

Returns the name of this principal.

Returns
  • the name of this principal.

public abstract int hashCode ()

Returns a hashcode for this principal.

Returns
  • a hashcode for this principal.

public abstract String toString ()

Returns a string representation of this principal.

Returns
  • a string representation of this principal.