/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} and {@link * #iterator}. If you override either of those methods, you may wish to override {@link * #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@Nullable Object object) { return Lists.equalsImpl(this, object); }
@Override public boolean equals(@Nullable Object obj) { return Lists.equalsImpl(this, obj); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} and {@link * #iterator}. If you override either of those methods, you may wish to override {@link * #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@NullableDecl Object object) { return Lists.equalsImpl(this, object); }
@Override public boolean equals(@NullableDecl Object obj) { return Lists.equalsImpl(this, obj); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} and {@link * #iterator}. If you override either of those methods, you may wish to override {@link * #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@NullableDecl Object object) { return Lists.equalsImpl(this, object); }
@Override public boolean equals(@NullableDecl Object obj) { return Lists.equalsImpl(this, obj); }
public void testEqualsImpl() { List<Integer> base = createList(Integer.class, 1, 2, 2); List<Integer> copy = createList(Integer.class, 1, 2, 2); ImmutableList<Integer> otherType = ImmutableList.of(1, 2, 2); List<Integer> outOfOrder = createList(Integer.class, 2, 2, 1); List<Integer> diffValue = createList(Integer.class, 1, 2, 3); List<Integer> diffLength = createList(Integer.class, 1, 2); List<Integer> empty = createList(Integer.class); assertThat(Lists.equalsImpl(base, copy)).isTrue(); assertThat(Lists.equalsImpl(base, otherType)).isTrue(); List<Object> unEqualItems = Arrays.asList(outOfOrder, diffValue, diffLength, empty, null, new Object()); for (Object other : unEqualItems) { assertThat(Lists.equalsImpl(base, other)).named("%s", other).isFalse(); } }
@Override public boolean equals(Object obj) { return Lists.equalsImpl(this, obj); }
@Override public boolean equals(@Nullable Object obj) { return Lists.equalsImpl(this, obj); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} * and {@link #iterator}. If you override either of those methods, you may * wish to override {@link #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@Nullable Object object) { return Lists.equalsImpl(this, object); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} * and {@link #iterator}. If you override either of those methods, you may * wish to override {@link #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@Nullable Object object) { return Lists.equalsImpl(this, object); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} * and {@link #iterator}. If you override either of those methods, you may * wish to override {@link #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@Nullable Object object) { return Lists.equalsImpl(this, object); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} * and {@link #iterator}. If you override either of those methods, you may * wish to override {@link #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@Nullable Object object) { return Lists.equalsImpl(this, object); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} * and {@link #iterator}. If you override either of those methods, you may * wish to override {@link #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@Nullable Object object) { return Lists.equalsImpl(this, object); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} * and {@link #iterator}. If you override either of those methods, you may * wish to override {@link #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@Nullable Object object) { return Lists.equalsImpl(this, object); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} * and {@link #iterator}. If you override either of those methods, you may * wish to override {@link #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@Nullable Object object) { return Lists.equalsImpl(this, object); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} * and {@link #iterator}. If you override either of those methods, you may * wish to override {@link #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@Nullable Object object) { return Lists.equalsImpl(this, object); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} * and {@link #iterator}. If you override either of those methods, you may * wish to override {@link #equals(Object)} to forward to this implementation. * * @since 7 */ @Beta protected boolean standardEquals(@Nullable Object object) { return Lists.equalsImpl(this, object); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} and {@link * #iterator}. If you override either of those methods, you may wish to override {@link * #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@NullableDecl Object object) { return Lists.equalsImpl(this, object); }
/** * A sensible definition of {@link #equals(Object)} in terms of {@link #size} and {@link * #iterator}. If you override either of those methods, you may wish to override {@link * #equals(Object)} to forward to this implementation. * * @since 7.0 */ @Beta protected boolean standardEquals(@Nullable Object object) { return Lists.equalsImpl(this, object); }