Class Metrics
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.report.Metrics
-
public abstract class Metrics extends Object
A utility for performing common operations against aPolicyStats.Metric.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetrics.Builder
-
Constructor Summary
Constructors Constructor Description Metrics()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Metrics.Builderbuilder()Comparator<PolicyStats>comparator(String header)A comparator to sort by the given column.abstract DoubleFunction<String>doubleFormatter()Stringformat(PolicyStats.Metric metric)Returns the stringified value for the metric; empty if absent.abstract LongFunction<String>longFormatter()abstract Function<Object,String>objectFormatter()abstract DoubleFunction<String>percentFormatter()
-
-
-
Method Detail
-
percentFormatter
public abstract DoubleFunction<String> percentFormatter()
-
doubleFormatter
public abstract DoubleFunction<String> doubleFormatter()
-
longFormatter
public abstract LongFunction<String> longFormatter()
-
format
public String format(PolicyStats.Metric metric)
Returns the stringified value for the metric; empty if absent.
-
comparator
public Comparator<PolicyStats> comparator(String header)
A comparator to sort by the given column.
-
builder
public static Metrics.Builder builder()
-
-