1 package se.citerus.dddsample.domain.shared; 2 3 /** 4 * An entity, as explained in the DDD book. 5 * 6 */ 7 public interface Entity<T> { 8 9 /** 10 * Entities compare by identity, not by attributes. 11 * 12 * @param other The other entity. 13 * @return true if the identities are the same, regardles of other attributes. 14 */ 15 boolean sameIdentityAs(T other); 16 17 }