Interface Observance

All Superinterfaces:
Function<Integer,LocalDate>, Predicate<Integer>
All Known Subinterfaces:
EasterObservance
All Known Implementing Classes:
AbstractObservance, AscensionDay, AshWednesday, AutumnalEquinoxDay, BankHoliday, BoxingDayCAD, ChineseNewYearDay, ChineseNewYearFirstDay, ChineseNewYearSecondDay, CivicHoliday, ColumbusDay, ComingOfAgeDay, CompositeObservance, CorpusChristi, DayAfterThanksgiving, Deepavali, DragonBoatFestival, EarlyMayBankHoliday, EasterMonday, EmperorsBirthday, EuropeDay, FamilyDay, FamilyDayCAD, GoodFriday, HariRayaHaji, HariRayaPuasa, KingsBirthday, LaborDay, LabourDay, MarineDay, MartinLutherKingJrDay, MayDay, MemorialDay, MidAutumnFestival, NationalDayForTruthAndReconciliation, OrthodoxEaster, PalmSunday, PresidentsDay, QingmingFestival, RespectForTheAgedDay, ShroveTuesday, SportsDay, SpringBankHoliday, SummerBankHoliday, Thanksgiving, Thanksgiving, VernalEquinoxDay, VesakDay, VictoriaDay, VictoryInEuropeDay, WesternEaster, WhitMonday, WhitSunday
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 Observance extends Function<Integer,LocalDate>, Predicate<Integer>
Function for computation of observed date of a holiday for a specified year. Implementations of this functional interface also behave as a Predicate for determination of whether the represented holiday occurs in the given year.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    test(Integer year)
    Determines whether this observance applies to the specified year.

    Methods inherited from interface java.util.function.Function

    andThen, apply, compose

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Method Details

    • test

      default boolean test(Integer year)
      Determines whether this observance applies to the specified year.
      Specified by:
      test in interface Predicate<Integer>
      Parameters:
      year - year of potential observance
      Returns:
      true if the input year applies for this observance, otherwise false