Class ImmutableQuantityHistogram
- java.lang.Object
-
- com.pervasivecode.utils.stats.histogram.measure.ImmutableQuantityHistogram
-
-
Constructor Summary
Constructors Constructor Description ImmutableQuantityHistogram()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <N extends Number,Q extends Quantity<Q>>
ImmutableHistogram<Quantity<Q>>of(Histogram<N> histogram, Unit<Q> baseUnit, QuantityFactory<Q> quantityFactory)Make a copy of a histogram, transforming its upper bound values into instances ofQuantitywith the specified measurement and unit.
-
-
-
Method Detail
-
of
public static <N extends Number,Q extends Quantity<Q>> ImmutableHistogram<Quantity<Q>> of(Histogram<N> histogram, Unit<Q> baseUnit, QuantityFactory<Q> quantityFactory)
Make a copy of a histogram, transforming its upper bound values into instances ofQuantitywith the specified measurement and unit.- Type Parameters:
N- The numeric value type of the input histogram.Q- The Quantity value type of the desired histogram.- Parameters:
histogram- The histogram of plainNumbervalues.baseUnit- The unit that the upper bound values in the histogram should represent. Example: if the histogram contains Long values representing milliseconds, this argument should represent one millisecond.quantityFactory- An object that can instantiate objects of typeQuantity<Q>.- Returns:
- A copy of the input histogram, transformed so its upper bound values are represented as
Quantityvalues of measure type Q.
-
-