@Test void testHashCode() { Id id0 = Id.getProvider().fromLong(17L); Id id1 = Id.getProvider().fromLong(44L); PersistentEObject o0 = new DefaultPersistentEObject(id0); PersistentEObject o1 = new DefaultPersistentEObject(id0); PersistentEObject o2 = new DefaultPersistentEObject(id1); assertThat(o0.hashCode()).isEqualTo(Objects.hash(id0)); assertThat(o1.hashCode()).isEqualTo(Objects.hash(id0)); assertThat(o2.hashCode()).isEqualTo(Objects.hash(id1)); }
@Override public int hashCode() { return Objects.hash(id()); }
DefaultPersistentEObject extends MinimalEStoreEObjectImpl implements PersistentEObject { @Override public int hashCode() { return Objects.hash(id()); } }
DefaultPersistentEObject extends MinimalEStoreEObjectImpl implements PersistentEObject { @Override public int hashCode() { return Objects.hash(id()); } @VisibleForTesting  DefaultPersistentEObject(); protected  DefaultPersistentEObject(Id id); }
DefaultPersistentEObject extends MinimalEStoreEObjectImpl implements PersistentEObject { @Override public int hashCode() { return Objects.hash(id()); } @VisibleForTesting  DefaultPersistentEObject(); protected  DefaultPersistentEObject(Id id); @Nonnull @Override Id id(); @Override void id(Id newId); @Override @Nullable Resource.Internal resource(); @Override void resource(@Nullable Resource.Internal newResource); @Override void eSetDirectResource(@Nullable Resource.Internal resource); @Nonnull @Override EList<EObject> eContents(); @Nonnull @Override @SuppressWarnings("unchecked") TreeIterator<EObject> eAllContents(); @Nullable @Override Resource.Internal eInternalResource(); @Override void eSetStore(EStore store); @Override String toString(); @Nonnull @Override StoreAdapter eStore(); @Nullable @Override Object dynamicGet(int dynamicFeatureId); @Override void dynamicSet(int dynamicFeatureId, Object value); @Override void dynamicUnset(int dynamicFeatureId); @Override PersistentEObject eInternalContainer(); @Override int eContainerFeatureID(); @Override int hashCode(); @Override boolean equals(@Nullable Object o); }
DefaultPersistentEObject extends MinimalEStoreEObjectImpl implements PersistentEObject { @Override public int hashCode() { return Objects.hash(id()); } @VisibleForTesting  DefaultPersistentEObject(); protected  DefaultPersistentEObject(Id id); @Nonnull @Override Id id(); @Override void id(Id newId); @Override @Nullable Resource.Internal resource(); @Override void resource(@Nullable Resource.Internal newResource); @Override void eSetDirectResource(@Nullable Resource.Internal resource); @Nonnull @Override EList<EObject> eContents(); @Nonnull @Override @SuppressWarnings("unchecked") TreeIterator<EObject> eAllContents(); @Nullable @Override Resource.Internal eInternalResource(); @Override void eSetStore(EStore store); @Override String toString(); @Nonnull @Override StoreAdapter eStore(); @Nullable @Override Object dynamicGet(int dynamicFeatureId); @Override void dynamicSet(int dynamicFeatureId, Object value); @Override void dynamicUnset(int dynamicFeatureId); @Override PersistentEObject eInternalContainer(); @Override int eContainerFeatureID(); @Override int hashCode(); @Override boolean equals(@Nullable Object o);  }