All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pervasivecode.utils.measure.UnitLabelProvider Maven / Gradle / Ivy

Go to download

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 javax.annotation.Nullable;
import javax.measure.Quantity;
import javax.measure.Unit;

/**
 * Instances can provide the appropriate String label for a specified unit in a given locale. (A
 * given instance only knows how to provide labels for a single Locale.)
 * 

* Example: for the unit KIBI * InformationRate, a US-locale instance would return "KiBps" or * "KiB/s". */ public interface UnitLabelProvider> { /** * Get the label to use to use when formatting the specified unit. * @param unit The unit for which the label is needed. * @return The label, or null if the correct label is not known. */ @Nullable public String getLabel(Unit unit); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy