Class QuarterHasPassed

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

public class QuarterHasPassed extends Object implements org.jmolecules.event.types.DomainEvent
A DomainEvent published once a quarter has passed.
Author:
Oliver Drotbohm
  • Method Details

    • of

      public static QuarterHasPassed of(Year year, ShiftedQuarter quarter)
      Returns a QuarterHasPassed for the given Year and ShiftedQuarter.
      Parameters:
      year - must not be null.
      quarter - must not be null.
      Returns:
      will never be null.
    • of

      public static QuarterHasPassed of(Year year, Quarter quarter)
      Returns a QuarterHasPassed for the given Year and logical Quarter.
      Parameters:
      year - must not be null.
      quarter - must not be null.
      Returns:
      will never be null.
    • of

      public static QuarterHasPassed of(Year year, Quarter quarter, Month startMonth)
      Returns a QuarterHasPassed for the given Year, logical Quarter and start Month.
      Parameters:
      year - must not be null.
      quarter - must not be null.
      startMonth - must not be null.
      Returns:
      will never be null.
    • getStartDate

      public LocalDate getStartDate()
      Returns the date of the first day of the quarter that has just passed.
      Returns:
      will never be null.
    • getEndDate

      public LocalDate getEndDate()
      Returns the date of the last day of the quarter that has just 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