加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090326194432/http://developer.android.com:80/reference/java/security/Principal.html
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 argument to the receiver, and returns true if they represent the same object using a class specific comparison.
abstract String getName()
abstract int hashCode()
Returns an integer hash code for the receiver.
abstract String toString()
Returns a string containing a concise, human-readable description of the receiver.

Public Methods

public abstract boolean equals (Object obj)

Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. The implementation in Object returns true only if the argument is the exact same object as the receiver (==).

Parameters
obj Object the object to compare with this object.
Returns
  • boolean true if the object is the same as this object false if it is different from this object.

public abstract String getName ()

public abstract int hashCode ()

Returns an integer hash code for the receiver. Any two objects which answer true when passed to .equals must answer the same value for this method.

Returns
  • int the receiver's hash.

public abstract String toString ()

Returns a string containing a concise, human-readable description of the receiver.

Returns
  • String a printable representation for the receiver.