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:
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. |
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. |
String getName ()
Returns the name of this principal.
Returns | |
---|---|
String |
the name of this principal. |
int hashCode ()
Returns a hashcode for this principal.
Returns | |
---|---|
int |
a hashcode for this principal. |
String toString ()
Returns a string representation of this principal.
Returns | |
---|---|
String |
a string representation of this principal. |