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 TypeMethodDescriptionboolean
Returns whether the givenLocalDate
is contained in the currentShiftedQuarter
.boolean
getEnd()
getEndDate
(Year year) Returns the end date of theShiftedQuarter
for the givenYear
.Returns the logicalQuarter
.getStart()
getStartDate
(Year year) Returns the start date of theShiftedQuarter
for the givenYear
.int
hashCode()
boolean
Returns whether the givenLocalDate
is the last day of theShiftedQuarter
.next()
Returns the nextShiftedQuarter
.static ShiftedQuarter
static 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 givenLocalDate
is 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 givenLocalDate
is the last day of theShiftedQuarter
.- Parameters:
date
- must not be null.
-
getStartDate
Returns the start date of theShiftedQuarter
for the givenYear
.- Parameters:
year
- must not be null.- Returns:
- will never be null.
-
getEndDate
Returns the end date of theShiftedQuarter
for the givenYear
.- Parameters:
year
- must not be null.- Returns:
- will never be null.
-
equals
-
hashCode
public int hashCode()
-