Class YearHasPassed
java.lang.Object
org.springframework.modulith.moments.YearHasPassed
- All Implemented Interfaces:
org.jmolecules.event.types.DomainEvent
A
DomainEvent published on the last day of the year.- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionboolean(package private) LocalDateReturns the end date of the year passed.(package private) LocalDateReturns the start date of the year passed.getYear()TheYearthat has just passed.inthashCode()static YearHasPassedof(int year) Creates a newYearHasPassedevent for the given year.static YearHasPassedCreates a newYearHasPassedfor the givenYear.
-
Method Details
-
of
Creates a newYearHasPassedfor the givenYear.- Parameters:
year- must not be null.
-
of
Creates a newYearHasPassedevent for the given year.- Parameters:
year- a valid year- Returns:
- will never be null.
-
getYear
TheYearthat 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
-
hashCode
public int hashCode()
-