private static <T> void addBoolIfDiffers(@NotNull Set<? super MetricEvent> set,
                                           @NotNull T settingsBean,
                                           @NotNull T defaultSettingsBean,
                                           @NotNull Function<T, Boolean> valueFunction,
                                           @NotNull Settings setting,
                                           EventPair<?> @NotNull ... pairs) {
    Boolean value = valueFunction.apply(settingsBean);
    Boolean defaultValue = valueFunction.apply(defaultSettingsBean);
    if (!Comparing.equal(value, defaultValue)) {
      List<EventPair<?>> values = new ArrayList<>(Arrays.asList(pairs));
      values.add(SETTING_ID.with(setting));
      values.add(EventFields.Enabled.with(value));
      set.add(SETTING.metric(values));
    }
  }
private static <T> void addBoolIfDiffers(@NotNull Set<? super MetricEvent> set,
                                           @NotNull T settingsBean,
                                           @NotNull T defaultSettingsBean,
                                           @NotNull Function<T, Boolean> valueFunction,
                                           @NotNull Settings setting,
                                           EventPair<?> @NotNull ... pairs)