private static <T, V> void addIfDiffers(@NotNull Set<? super MetricEvent> set,
                                          @NotNull T settingsBean,
                                          @NotNull T defaultSettingsBean,
                                          @NotNull Function<? super T, ? extends V> valueFunction,
                                          @NotNull Settings setting,
                                          @NotNull EventField<V> field) {
    V value = valueFunction.apply(settingsBean);
    V defaultValue = valueFunction.apply(defaultSettingsBean);
    if (!Comparing.equal(value, defaultValue)) {
      set.add(SETTING.metric(SETTING_ID.with(setting), field.with(value)));
    }
  }
private static <T, V> void addIfDiffers(@NotNull Set<? super MetricEvent> set,
                                          @NotNull T settingsBean,
                                          @NotNull T defaultSettingsBean,
                                          @NotNull Function<? super T, ? extends V> valueFunction,
                                          @NotNull Settings setting,
                                          @NotNull EventField<V> field)