Class CompositeObservance

java.lang.Object
org.holiday.calendar.observance.AbstractObservance
org.holiday.calendar.observance.CompositeObservance
All Implemented Interfaces:
Function<Integer,LocalDate>, Predicate<Integer>, Observance
Direct Known Subclasses:
AscensionDay, AshWednesday, CorpusChristi, EasterMonday, GoodFriday, PalmSunday, ShroveTuesday, WhitMonday, WhitSunday

public abstract class CompositeObservance extends AbstractObservance
Abstract base class for observances that are computed relative to another Observance (the base). Year validity is delegated to the base.
Author:
Dave Joyce
  • Field Details

  • Constructor Details

    • CompositeObservance

      protected CompositeObservance(Observance base)
  • Method Details

    • isValidYear

      protected boolean isValidYear(int year)
      Description copied from class: AbstractObservance
      Determine whether this observance applies in the given year. Defaults to true (all years are valid).
      Overrides:
      isValidYear in class AbstractObservance
      Parameters:
      year - the year to test
      Returns:
      true if this observance applies