Class AbstractHolidayCalendarService

java.lang.Object
org.holiday.calendar.AbstractHolidayCalendarService
All Implemented Interfaces:
HolidayCalendarService

public abstract class AbstractHolidayCalendarService extends Object implements HolidayCalendarService
Abstract base class for HolidayCalendarService implementations, providing the identity behavior common to all concrete service classes.
Author:
Dave Joyce
  • Constructor Details

    • AbstractHolidayCalendarService

      protected AbstractHolidayCalendarService(String code, String name)
  • Method Details

    • isProvided

      public boolean isProvided(String code)
      Description copied from interface: HolidayCalendarService
      Determine if this service provides the HolidayCalendar for the specified code.
      Specified by:
      isProvided in interface HolidayCalendarService
      Parameters:
      code - short code identifier of desired holiday calendar
      Returns:
      true if this service provides the holiday calendar for the given code, false otherwise
    • getCode

      public String getCode()
      Description copied from interface: HolidayCalendarService
      Get the short code identifier for the holiday calendar provided by this service. Returns null if not implemented.
      Specified by:
      getCode in interface HolidayCalendarService
      Returns:
      short code identifier, e.g. "US", "UK"
    • getRegion

      public String getRegion()
      Description copied from interface: HolidayCalendarService
      Get the human-readable name of the region for this holiday calendar. Returns null if not implemented.
      Specified by:
      getRegion in interface HolidayCalendarService
      Returns:
      region name, e.g. "United States National Holidays"