/** * <p> * The statistical values for the metric. * </p> * This is a convenience that creates an instance of the {@link StatisticSet.Builder} avoiding the need to * create one manually via {@link StatisticSet#builder()}. * * When the {@link Consumer} completes, {@link StatisticSet.Builder#build()} is called immediately and its * result is passed to {@link #statisticValues(StatisticSet)}. * * @param statisticValues * a consumer that will call methods on {@link StatisticSet.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #statisticValues(StatisticSet) */ default Builder statisticValues(Consumer<StatisticSet.Builder> statisticValues) { return statisticValues(StatisticSet.builder().applyMutation(statisticValues).build()); }
/** * <p> * The statistical values for the metric. * </p> * This is a convenience that creates an instance of the {@link StatisticSet.Builder} avoiding the need to * create one manually via {@link StatisticSet#builder()}. * * When the {@link Consumer} completes, {@link StatisticSet.Builder#build()} is called immediately and its * result is passed to {@link #statisticValues(StatisticSet)}. * * @param statisticValues * a consumer that will call methods on {@link StatisticSet.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #statisticValues(StatisticSet) */ default Builder statisticValues(Consumer<StatisticSet.Builder> statisticValues) { return statisticValues(StatisticSet.builder().applyMutation(statisticValues).build()); }