Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Principal

public interface Principal

java.security.Principal
Known Indirect Subclasses


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

equals

Added in API level 1
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 Object: principal to compare with.
Returns
boolean true if the principal passed in is the same as that encapsulated by this principal, and false otherwise.

getName

Added in API level 1
String getName ()

Returns the name of this principal.

Returns
String the name of this principal.

hashCode

Added in API level 1
int hashCode ()

Returns a hashcode for this principal.

Returns
int a hashcode for this principal.

toString

Added in API level 1
String toString ()

Returns a string representation of this principal.

Returns
String a string representation of this principal.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.