8284851: Update javax.crypto files to use proper javadoc for mentioned classes

Reviewed-by: weijun, valeriep
This commit is contained in:
Mark Powers 2022-07-07 23:20:58 +00:00 committed by Valerie Peng
parent 8cdead0c94
commit f804f2ce8e
92 changed files with 2142 additions and 2010 deletions

View file

@ -28,7 +28,7 @@ package java.security;
import javax.security.auth.Subject;
/**
* This interface represents the abstract notion of a principal, which
* This interface represents the abstract notion of a {@code Principal}, which
* can be used to represent any entity, such as an individual, a
* corporation, and a login id.
*
@ -40,52 +40,54 @@ import javax.security.auth.Subject;
public interface Principal {
/**
* Compares this principal to the specified object. Returns true
* if the object passed in matches the principal represented by
* Compares this {@code Principal} to the specified object.
* Returns {@code true}
* if the object passed in matches the {@code Principal} represented by
* the implementation of this interface.
*
* @param another principal to compare with.
* @param another {@code Principal} to compare with.
*
* @return true if the principal passed in is the same as that
* encapsulated by this principal, and false otherwise.
* @return {@code true} if the {@code Principal} passed in is the same as
* that encapsulated by this {@code Principal}, and {@code false} otherwise.
*/
boolean equals(Object another);
/**
* Returns a string representation of this principal.
* Returns a string representation of this {@code Principal}.
*
* @return a string representation of this principal.
* @return a string representation of this {@code Principal}.
*/
String toString();
/**
* Returns a hashcode for this principal.
* Returns a hashcode for this {@code Principal}.
*
* @return a hashcode for this principal.
* @return a hashcode for this {@code Principal}.
*/
int hashCode();
/**
* Returns the name of this principal.
* Returns the name of this {@code Principal}.
*
* @return the name of this principal.
* @return the name of this {@code Principal}.
*/
String getName();
/**
* Returns true if the specified subject is implied by this principal.
* Returns {@code true} if the specified subject is implied by this
* {@code Principal}.
*
* @implSpec
* The default implementation of this method returns true if
* {@code subject} is non-null and contains at least one principal that
* is equal to this principal.
* The default implementation of this method returns {@code true} if
* {@code subject} is non-null and contains at least one
* {@code Principal} that is equal to this {@code Principal}.
*
* <p>Subclasses may override this with a different implementation, if
* necessary.
*
* @param subject the {@code Subject}
* @return true if {@code subject} is non-null and is
* implied by this principal, or false otherwise.
* @return {@code true} if {@code subject} is non-null and is
* implied by this {@code Principal}, or false otherwise.
* @since 1.8
*/
default boolean implies(Subject subject) {