Most visited

Recently visited

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.

Hooray!