View Javadoc

1   package se.citerus.dddsample.domain.shared.experimental;
2   
3   /**
4    * A domain event is something that is unique, but does not have a lifecycle.
5    * The identity may be explicit, for example the sequence number of a payment,
6    * or it could be derived from various aspects of the event such as where, when and what
7    * has happened.
8    */
9   public interface DomainEvent<T> {
10  
11    /**
12     * @param other The other domain event.
13     * @return <code>true</code> if the given domain event and this event are regarded as being the same event.
14     */
15    boolean sameEventAs(T other);
16  
17  }