Skip to content

Commit

Permalink
Add Javadoc to the guava-android copy of Equivalence.doEquivalent.
Browse files Browse the repository at this point in the history
RELNOTES=n/a
PiperOrigin-RevId: 627568700
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Apr 24, 2024
1 parent 4be0c81 commit f88cd5c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 7 additions & 1 deletion android/guava/src/com/google/common/base/Equivalence.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
* The type parameter is <T> rather than <T extends @Nullable> so that we can use T in the
* doEquivalent and doHash methods to indicate that the parameter cannot be null.
*/
public abstract class Equivalence<T> {
public abstract class Equivalence<T>
{
/** Constructor for use by subclasses. */
protected Equivalence() {}

Expand Down Expand Up @@ -77,6 +78,11 @@ public final boolean equivalent(@CheckForNull T a, @CheckForNull T b) {
}

/**
* Implemented by the user to determine whether {@code a} and {@code b} are considered equivalent,
* subject to the requirements specified in {@link #equivalent}.
*
* <p>This method should not be called except by {@link #equivalent}. When {@link #equivalent}
* calls this method, {@code a} and {@code b} are guaranteed to be distinct, non-null instances.
*
* @since 10.0 (previously, subclasses would override equivalent())
*/
Expand Down
3 changes: 2 additions & 1 deletion android/guava/src/com/google/common/base/Function.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
*/
@GwtCompatible
@ElementTypesAreNonnullByDefault
public interface Function<F extends @Nullable Object, T extends @Nullable Object> {
public interface Function<F extends @Nullable Object, T extends @Nullable Object>
{
/**
* Returns the result of applying this function to {@code input}. This method is <i>generally
* expected</i>, but not absolutely required, to have the following properties:
Expand Down
3 changes: 2 additions & 1 deletion android/guava/src/com/google/common/base/Supplier.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
*/
@GwtCompatible
@ElementTypesAreNonnullByDefault
public interface Supplier<T extends @Nullable Object> {
public interface Supplier<T extends @Nullable Object>
{
/**
* Retrieves an instance of the appropriate type. The returned object may or may not be a new
* instance, depending on the implementation.
Expand Down

0 comments on commit f88cd5c

Please sign in to comment.