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) LocalDate
Returns the end date of the year passed.(package private) LocalDate
Returns the start date of the year passed.getYear()
TheYear
that has just passed.int
hashCode()
static YearHasPassed
of
(int year) Creates a newYearHasPassed
event for the given year.static YearHasPassed
Creates a newYearHasPassed
for the givenYear
.
-
Method Details
-
of
Creates a newYearHasPassed
for the givenYear
.- Parameters:
year
- must not be null.
-
of
Creates a newYearHasPassed
event for the given year.- Parameters:
year
- a valid year- Returns:
- will never be null.
-
getYear
TheYear
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
-
hashCode
public int hashCode()
-