Class YearHasPassed

java.lang.Object
org.springframework.modulith.moments.YearHasPassed
All Implemented Interfaces:
org.jmolecules.event.types.DomainEvent

public class YearHasPassed extends Object implements org.jmolecules.event.types.DomainEvent
A DomainEvent published on the last day of the year.
Author:
Oliver Drotbohm
  • Method Details

    • of

      public static YearHasPassed of(Year year)
      Creates a new YearHasPassed for the given Year.
      Parameters:
      year - must not be null.
    • of

      public static YearHasPassed of(int year)
      Creates a new YearHasPassed event for the given year.
      Parameters:
      year - a valid year
      Returns:
      will never be null.
    • getYear

      public Year getYear()
      The Year that has just passed.
      Returns:
      will never be null.
    • getStartDate

      LocalDate getStartDate()
      Returns the start date of the year passed.
      Returns:
      will never be null.
    • getEndDate

      LocalDate getEndDate()
      Returns the end date of the year passed.
      Returns:
      will never be null.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object