Build 1.1_r1 (from source)

java.security
Interface Principal

All Known Subinterfaces:
Group
All Known Implementing Classes:
BasicUserPrincipal, Identity, IdentityScope, NTUserPrincipal, Signer, X500Principal

public interface Principal

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

Since:
Android 1.0

Method Summary
 boolean equals(Object obj)
          Compares the specified object with this Principal for equality and returns true if the specified object is equal, false otherwise.
 String getName()
          Returns the name of this Principal.
 int hashCode()
          Returns the hash code value for this Principal.
 String toString()
          Returns a string containing a concise, human-readable description of this Principal.
 

Method Detail

equals

boolean equals(Object obj)
Compares the specified object with this Principal for equality and returns true if the specified object is equal, false otherwise.

Overrides:
equals in class Object
Parameters:
obj - object to be compared for equality with this Principal.
Returns:
true if the specified object is equal to this Principal, otherwise false.
Since:
Android 1.0
See Also:
Object.hashCode()

getName

String getName()
Returns the name of this Principal.

Returns:
the name of this Principal.
Since:
Android 1.0

hashCode

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 Object.hashCode().

Overrides:
hashCode in class Object
Returns:
the hash code value for this Principal.
Since:
Android 1.0
See Also:
Object.equals(Object), equals(Object)

toString

String toString()
Returns a string containing a concise, human-readable description of this Principal.

Overrides:
toString in class Object
Returns:
a printable representation for this Principal.
Since:
Android 1.0

Build 1.1_r1 (from source)

Please submit a feedback, bug or feature