Class ShiftedQuarter
java.lang.Object
org.springframework.modulith.moments.ShiftedQuarter
A quarter that can be shifted to start at a configurable
Month.- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the givenLocalDateis contained in the currentShiftedQuarter.booleangetEnd()getEndDate(Year year) Returns the end date of theShiftedQuarterfor the givenYear.Returns the logicalQuarter.getStart()getStartDate(Year year) Returns the start date of theShiftedQuarterfor the givenYear.inthashCode()booleanReturns whether the givenLocalDateis the last day of theShiftedQuarter.next()Returns the nextShiftedQuarter.static ShiftedQuarterstatic ShiftedQuarter
-
Method Details
-
of
- Parameters:
quarter- must not be null.startMonth- must not be null.
-
of
-
getQuarter
Returns the logicalQuarter.- Returns:
- will never be null.
-
next
Returns the nextShiftedQuarter.- Returns:
- will never be null.
-
contains
Returns whether the givenLocalDateis contained in the currentShiftedQuarter.- Parameters:
date- must not be null.- Returns:
-
getStart
- Returns:
- will never be null.
-
getEnd
- Returns:
- will never be null.
-
isLastDay
Returns whether the givenLocalDateis the last day of theShiftedQuarter.- Parameters:
date- must not be null.
-
getStartDate
Returns the start date of theShiftedQuarterfor the givenYear.- Parameters:
year- must not be null.- Returns:
- will never be null.
-
getEndDate
Returns the end date of theShiftedQuarterfor the givenYear.- Parameters:
year- must not be null.- Returns:
- will never be null.
-
equals
-
hashCode
public int hashCode()
-