/** {@inheritDoc} */ @Override public void parse(int year, Set<Holiday> holidays, Holidays config) { for (EthiopianOrthodoxHoliday h : config.getEthiopianOrthodoxHoliday()) { if (!isValid(h, year)) { continue; } final Set<LocalDate> ethiopianHolidays; switch (h.getType()) { case TIMKAT: ethiopianHolidays = calendarUtil.getEthiopianOrthodoxHolidaysInGregorianYear(year, 5, 10); break; case ENKUTATASH: ethiopianHolidays = calendarUtil.getEthiopianOrthodoxHolidaysInGregorianYear(year, 1, 1); break; case MESKEL: ethiopianHolidays = calendarUtil.getEthiopianOrthodoxHolidaysInGregorianYear(year, 1, 17); break; default: throw new IllegalArgumentException("Unknown ethiopian orthodox holiday type " + h.getType()); } String propertiesKey = PREFIX_PROPERTY_ETHIOPIAN_ORTHODOX + h.getType().name(); HolidayType type = xmlUtil.getType(h.getLocalizedType()); for (LocalDate d : ethiopianHolidays) { holidays.add(new Holiday(d, propertiesKey, type)); } } }