
com.pervasivecode.utils.measure.ScalingDurationFormatter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of measurement-utils-jsr363 Show documentation
Show all versions of measurement-utils-jsr363 Show documentation
Classes for using and formatting data and data-rate values in the JSR 363 Units of Measurement API.
The newest version!
package com.pervasivecode.utils.measure;
import static tec.uom.se.unit.MetricPrefix.NANO;
import static tec.uom.se.unit.Units.SECOND;
import java.time.Duration;
import java.util.Objects;
import javax.measure.Quantity;
import javax.measure.quantity.Time;
import com.pervasivecode.utils.time.DurationFormatter;
import tec.uom.se.quantity.Quantities;
/**
* Format a {@code Quantity}<{@code Time}> value using a {@link DurationFormatter}, for a
* representation that uses common units of time rather than metric prefixes (ex. "1 day" rather
* than "86.4 Ks").
*/
public class ScalingDurationFormatter implements QuantityFormatter
© 2015 - 2025 Weber Informatics LLC | Privacy Policy