Class RelativeHoliday

    • Constructor Detail

      • RelativeHoliday

        public RelativeHoliday​(Holiday base,
                               int plusDays)
        Create a new holiday using the given base holiday and the given number of days as the shift.
        Parameters:
        base - a non-null holiday to use as a base.
        plusDays - a number of days to use as the shift (can be negative)
        Throws:
        NullPointerException - if the given base is null
    • Method Detail

      • 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.
        See Also:
        Holiday.check(LocalDate)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object