to top
Android APIs
Added in API level 1
public interface

Principal

java.security.Principal
Known Indirect Subclasses

Class Overview

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

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 Principals 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.