@Test public void testEqualsSelf() { OsgiModelReference<Object> reference = createReference(); assertThat(reference.equals(reference)).isTrue(); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj == null || obj.getClass() != getClass()) { return false; } OsgiModelReference<?> other = (OsgiModelReference<?>) obj; return this.bundleId == other.bundleId && this.modelClass.getName().equals(other.modelClass.getName()); }
OsgiModelReference { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj == null || obj.getClass() != getClass()) { return false; } OsgiModelReference<?> other = (OsgiModelReference<?>) obj; return this.bundleId == other.bundleId && this.modelClass.getName().equals(other.modelClass.getName()); } }
OsgiModelReference { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj == null || obj.getClass() != getClass()) { return false; } OsgiModelReference<?> other = (OsgiModelReference<?>) obj; return this.bundleId == other.bundleId && this.modelClass.getName().equals(other.modelClass.getName()); } OsgiModelReference(T model, long bundleId); }
OsgiModelReference { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj == null || obj.getClass() != getClass()) { return false; } OsgiModelReference<?> other = (OsgiModelReference<?>) obj; return this.bundleId == other.bundleId && this.modelClass.getName().equals(other.modelClass.getName()); } OsgiModelReference(T model, long bundleId); T getModel(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
OsgiModelReference { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj == null || obj.getClass() != getClass()) { return false; } OsgiModelReference<?> other = (OsgiModelReference<?>) obj; return this.bundleId == other.bundleId && this.modelClass.getName().equals(other.modelClass.getName()); } OsgiModelReference(T model, long bundleId); T getModel(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }