private static AlertConfigDto fromConfig(AlertConfig alertConfig) { return ImmutableAlertConfigDto.builder() .transactionType(alertConfig.transactionType()) .percentile(alertConfig.percentile()) .timePeriodMinutes(alertConfig.timePeriodMinutes()) .thresholdMillis(alertConfig.thresholdMillis()) .minTransactionCount(alertConfig.minTransactionCount()) .addAllEmailAddresses(alertConfig.emailAddresses()) .version(alertConfig.version()) .build(); }
@Override public int compare(@Nullable AlertConfig left, @Nullable AlertConfig right) { checkNotNull(left); checkNotNull(right); return left.transactionType().compareToIgnoreCase(right.transactionType()); }