@@ -0,0 +1,2333 @@
+/**%0A * %0A */%0Apackage com.github.phantomthief.stats;%0A%0Aimport static java.util.function.Function.identity;%0A%0Aimport java.util.Map;%0Aimport java.util.concurrent.ScheduledExecutorService;%0Aimport java.util.concurrent.TimeUnit;%0Aimport java.util.function.Consumer;%0Aimport java.util.function.Function;%0Aimport java.util.function.UnaryOperator;%0A%0A/**%0A * @author w.vela%0A */%0Apublic class SingleStatsHelper%3CC%3E %7B%0A%0A    private static final String DEFAULT_KEY = %22s%22;%0A    private final StatsHelper%3CString, C%3E stats;%0A%0A    /**%0A     * @param stats%0A     */%0A    private SingleStatsHelper(StatsHelper%3CString, C%3E stats) %7B%0A        this.stats = stats;%0A    %7D%0A%0A    public void stats(Consumer%3CC%3E counterFunction) %7B%0A        stats.stats(DEFAULT_KEY, counterFunction);%0A    %7D%0A%0A    public Map%3CLong, C%3E getStats() %7B%0A        return stats.getStats().get(DEFAULT_KEY);%0A    %7D%0A%0A    public %3CV%3E Map%3CString, V%3E getFriendlyStats(Function%3CC, V%3E counterFormatter) %7B%0A        return stats.getFriendlyStats(identity(), counterFormatter).get(DEFAULT_KEY);%0A    %7D%0A%0A    public %3CD, V%3E Map%3CD, V%3E getFriendlyStats( //%0A            Function%3CLong, D%3E durationFormatter, //%0A            Function%3CC, V%3E counterFormatter) %7B%0A        return stats.getFriendlyStats(identity(), durationFormatter, counterFormatter)%0A                .get(DEFAULT_KEY);%0A    %7D%0A%0A    public static final class Builder%3CC%3E %7B%0A%0A        private final com.github.phantomthief.stats.StatsHelper.Builder%3CC%3E builder = StatsHelper%0A                .newBuilder();%0A%0A        public com.github.phantomthief.stats.StatsHelper.Builder%3CC%3E addDuration(long duration,%0A                TimeUnit timeUnit) %7B%0A            return builder.addDuration(duration, timeUnit);%0A        %7D%0A%0A        public com.github.phantomthief.stats.StatsHelper.Builder%3CC%3E%0A                setCounterReset(UnaryOperator%3CC%3E resetter) %7B%0A            return builder.setCounterReset(resetter);%0A        %7D%0A%0A        public com.github.phantomthief.stats.StatsHelper.Builder%3CC%3E%0A                setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService) %7B%0A            return builder.setScheduledExecutorService(scheduledExecutorService);%0A        %7D%0A%0A        public SingleStatsHelper%3CC%3E build() %7B%0A            return new SingleStatsHelper%3C%3E(builder.build());%0A        %7D%0A    %7D%0A%0A    public static final %3CC%3E Builder%3CC%3E newBuilder() %7B%0A        return new Builder%3C%3E();%0A    %7D%0A%0A%7D%0A

add single stats helper.