Interface DateRoll

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 DateRoll
Defines date adjustment behavior for holiday observance when the calculated date falls on a weekend day. Date roll behavior is a defined attribute of a published holiday calendar.

This is a functional interface, supporting definition of date roll behavior for a HolidayCalendar as a lambda expression.

Author:
Dave Joyce
  • Method Summary

    Modifier and Type
    Method
    Description
    default DateRoll
    Returns a composed DateRoll that first applies this roll, then applies after.
    Roll the calculated date for the specified holiday in the given year to the nearest valid date.
  • Method Details

    • rollToObservedDate

      LocalDate rollToObservedDate(LocalDate dateToRoll)
      Roll the calculated date for the specified holiday in the given year to the nearest valid date.
      Parameters:
      dateToRoll - calculated holiday date to be rolled
      Returns:
      holiday date (adjusted for valid observance)
    • andThen

      default DateRoll andThen(DateRoll after)
      Returns a composed DateRoll that first applies this roll, then applies after.
      Parameters:
      after - the roll to apply after this one
      Returns:
      composed date roll