class FormatSettingsProvider {

  @SuppressWarnings("unchecked")
  public <T> FormatSettings<T> settings(Class<? extends T> clazz, FormatSettings<Object> defaultSettings) {
    FormatSettings<T> settings = (FormatSettings<T>) settingsCache.get(clazz);

    if (settings == null) {
      settings = (FormatSettings<T>) TYPE_SETTINGS.get(clazz);
      if (settings == null) {
        settings = (FormatSettings<T>) defaultSettings;
      }
      settingsCache.put(clazz, settings);
    }
    return settings;
  }

  protected  FormatSettingsProvider();

}