Returns {@code true} if the given objects are considered equivalent. <p>This method describes an <i>equivalence relation</i> on object references, meaning that for all references {@code x}, {@code y}, and {@code z} (any of which may be null): <ul> <li>{@code equivalent(x, x)} is true (<i>reflexi
(@Nullable T a, @Nullable T b)
| 66 | * long as neither {@code x} nor {@code y} is modified. |
| 67 | */ |
| 68 | public final boolean equivalent(@Nullable T a, @Nullable T b) { |
| 69 | if (a == b) { |
| 70 | return true; |
| 71 | } |
| 72 | if (a == null || b == null) { |
| 73 | return false; |
| 74 | } |
| 75 | return doEquivalent(a, b); |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * @deprecated Provided only to satisfy the {@link BiPredicate} interface; use {@link #equivalent} |