Class BridgedHoliday

java.lang.Object
fr.marcwrobel.jbanking.calendar.BridgedHoliday
All Implemented Interfaces:
Holiday

public class BridgedHoliday extends Object implements Holiday
A Holiday based on two other holidays that adds a holiday when the previous and next days are holidays.

This class is useful for modeling holidays like the bridged japanese holidays.

Since:
3.1.0
  • Constructor Details

    • BridgedHoliday

      public BridgedHoliday(Holiday first, Holiday second)
      Create a new holiday using the given first and second holidays.
      Parameters:
      first - the first non-null holiday
      second - the second non-null holiday
      Throws:
      NullPointerException - if one of the given holidays is null
  • Method Details

    • check

      public boolean check(LocalDate date)
      Description copied from interface: Holiday
      Check whether the given date is an occurrence of this holiday.
      Specified by:
      check in interface Holiday
      Parameters:
      date - the date to check.
      Returns:
      true if the given date is an occurrence of this holiday, false otherwise.