java.security

Interface Principal

public interface Principal

This interface models an entity (such as a user or a certificate authority) for the purposes of applying the Java security model.

Since: 1.1

See Also: X509Certificate

UNKNOWN: updated to 1.4

Method Summary
booleanequals(Object obj)
This method tests another Principal object for equality with this one.
StringgetName()
This method returns a String that names this Principal.
inthashCode()
This method returns a hash code value for this Principal.
StringtoString()
This method returns a String representation of this Principal.

Method Detail

equals

public boolean equals(Object obj)
This method tests another Principal object for equality with this one.

Parameters: obj the Object to test for equality

Returns: true if the specified Principal is equal

getName

public String getName()
This method returns a String that names this Principal.

Returns: the name of this Principal

hashCode

public int hashCode()
This method returns a hash code value for this Principal. Remember the contract of hashCode - two objects which compare as equals() must have the same hashCode().

Returns: a hash value

toString

public String toString()
This method returns a String representation of this Principal.

Returns: this Principal represented as a String