Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Principal

public interface Principal

java.security.Principal
Known Indirect Subclasses


Principals are objects which have identities. These can be individuals, groups, corporations, unique program executions, etc.

Summary

Public methods

abstract boolean equals(Object obj)

Compares the specified object with this Principal for equality and returns true if the specified object is equal, false otherwise.

abstract String getName()

Returns the name of this Principal.

abstract int hashCode()

Returns the hash code value for this Principal.

abstract String toString()

Returns a string containing a concise, human-readable description of this Principal.

Public methods

equals

Added in API level 1
boolean equals (Object obj)

Compares the specified object with this Principal for equality and returns true if the specified object is equal, false otherwise.

Parameters
obj Object: object to be compared for equality with this Principal.
Returns
boolean true if the specified object is equal to this Principal, otherwise false.

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 the hash code value for this Principal. Returns the same hash code for Principals that are equal to each other as required by the general contract of hashCode().

Returns
int the hash code value for this Principal.

See also:

toString

Added in API level 1
String toString ()

Returns a string containing a concise, human-readable description of this Principal.

Returns
String a printable representation for 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.