Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public interface

Principal

java.security.Principal
Known Indirect Subclasses

Class Overview

Principal s 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

public abstract boolean equals ( Object obj)

Added in API level 1

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

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

public abstract String getName ()

Added in API level 1

Returns the name of this Principal .

Returns
  • the name of this Principal .

public abstract int hashCode ()

Added in API level 1

Returns the hash code value for this Principal . Returns the same hash code for Principal s that are equal to each other as required by the general contract of hashCode() .

Returns
  • the hash code value for this Principal .

public abstract String toString ()

Added in API level 1

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

Returns
  • a printable representation for this Principal .