@Test void testEquals() { ProxyElement elt0 = new ProxyElement(); elt0.setId(ProxyValue.resolved(Id.getProvider().fromLong(42))); ProxyElement elt0Bis = new ProxyElement(); elt0Bis.setId(ProxyValue.resolved(Id.getProvider().fromLong(42))); ProxyElement elt1 = new ProxyElement(); elt1.setId(ProxyValue.resolved(Id.getProvider().fromLong(44))); assertThat(elt0).isEqualTo(elt0Bis); assertThat(elt0).isNotEqualTo(elt1); assertThat(elt1).isNotEqualTo(elt0Bis); assertThat(elt0).isEqualTo(elt0); assertThat(elt0).isNotEqualTo(null); assertThat(elt0).isNotEqualTo(0); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ProxyElement that = (ProxyElement) o; return Objects.equals(id, that.id); }
ProxyElement extends AbstractNamedElement<ProxyElement> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ProxyElement that = (ProxyElement) o; return Objects.equals(id, that.id); } }
ProxyElement extends AbstractNamedElement<ProxyElement> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ProxyElement that = (ProxyElement) o; return Objects.equals(id, that.id); }  }
ProxyElement extends AbstractNamedElement<ProxyElement> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ProxyElement that = (ProxyElement) o; return Objects.equals(id, that.id); }  @Nonnull ProxyValue<Id> getId(); @Nonnull ProxyElement setId(ProxyValue<Id> id); ProxyClass getMetaClass(); @Nonnull ProxyElement setMetaClass(ProxyClass metaClass); boolean isRoot(); @Nonnull ProxyElement setRoot(boolean isRoot); @Override int hashCode(); @Override boolean equals(@Nullable Object o); }
ProxyElement extends AbstractNamedElement<ProxyElement> { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ProxyElement that = (ProxyElement) o; return Objects.equals(id, that.id); }  @Nonnull ProxyValue<Id> getId(); @Nonnull ProxyElement setId(ProxyValue<Id> id); ProxyClass getMetaClass(); @Nonnull ProxyElement setMetaClass(ProxyClass metaClass); boolean isRoot(); @Nonnull ProxyElement setRoot(boolean isRoot); @Override int hashCode(); @Override boolean equals(@Nullable Object o);  }