Package com.opengamma.strata.basics.date
Interface DateAdjuster
-
- All Superinterfaces:
TemporalAdjuster
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface DateAdjuster extends TemporalAdjuster
Functional interface that can adjust a date.This extends
TemporalAdjuster
for those cases where the temporal to be adjusted is an ISO-8601 date.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description LocalDate
adjust(LocalDate date)
Adjusts the date according to the rules of the implementation.default Temporal
adjustInto(Temporal temporal)
Adjusts the temporal according to the rules of the implementation.
-
-
-
Method Detail
-
adjust
LocalDate adjust(LocalDate date)
Adjusts the date according to the rules of the implementation.Implementations must specify how the date is adjusted.
- Parameters:
date
- the date to adjust- Returns:
- the adjusted date
- Throws:
DateTimeException
- if unable to make the adjustmentArithmeticException
- if numeric overflow occurs
-
adjustInto
default Temporal adjustInto(Temporal temporal)
Adjusts the temporal according to the rules of the implementation.This method implements
TemporalAdjuster
by callingadjust(LocalDate)
. Note that conversion toLocalDate
ignores the calendar system of the input, which is the desired behaviour in this case.- Specified by:
adjustInto
in interfaceTemporalAdjuster
- Parameters:
temporal
- the temporal to adjust- Returns:
- the adjusted temporal
- Throws:
DateTimeException
- if unable to make the adjustmentArithmeticException
- if numeric overflow occurs
-
-