class HolidayCalendarIniLookup implements NamedLookup<HolidayCalendar> {

  @VisibleForTesting
  static ImmutableMap<String, HolidayCalendar> loadFromIni(String filename) {
    List<ResourceLocator> resources = ResourceConfig.orderedResources(filename);
    Map<String, HolidayCalendar> map = new HashMap<>();
    for (ResourceLocator resource : resources) {
      try {
        IniFile ini = IniFile.of(resource.getCharSource());
        for (String sectionName : ini.sections()) {
          PropertySet section = ini.section(sectionName);
          HolidayCalendar parsed = parseHolidayCalendar(sectionName, section);
          map.put(parsed.getName(), parsed);
          map.putIfAbsent(parsed.getName().toUpperCase(Locale.ENGLISH), parsed);
        }
      } catch (RuntimeException ex) {
        log.log(Level.SEVERE, "Error processing resource as Holiday Calendar INI file: " + resource, ex);
        return ImmutableMap.of();
      }
    }
    return ImmutableMap.copyOf(map);
  }

  private  HolidayCalendarIniLookup();

}