| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class | UnitsData.CategoriesSink
A Resource Sink that collects information from |
| public static class | UnitsData.Constants
Contains all the needed constants. |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private ConversionRates | |
| private static int[] | |
| private static String[] | |
| private UnitPreferences |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the corresponding category.An instance of MeasureUnitImpl. measureUnit)
|
| public static int | |
| public ConversionRates | |
| public UnitPreferences. | |
| public static String[] | |
| public UnitPreferences |
| conversionRates | back to summary |
|---|---|
| private ConversionRates conversionRates | |
| simpleUnitCategories | back to summary |
|---|---|
| private static int[] simpleUnitCategories | |
| simpleUnits | back to summary |
|---|---|
| private static String[] simpleUnits | |
| unitPreferences | back to summary |
|---|---|
| private UnitPreferences unitPreferences | |
| UnitsData | back to summary |
|---|---|
| public UnitsData() | |
| getCategory | back to summary |
|---|---|
public String getCategory(MeasureUnitImpl measureUnit)
| |
| getCategoryIndexOfSimpleUnit | back to summary |
|---|---|
| public static int getCategoryIndexOfSimpleUnit(int simpleUnitIndex) | |
| getConversionRates | back to summary |
|---|---|
| public ConversionRates getConversionRates() | |
| getPreferencesFor | back to summary |
|---|---|
| public UnitPreferences. | |
| getSimpleUnits | back to summary |
|---|---|
| public static String[] getSimpleUnits() | |
| getUnitPreferences | back to summary |
|---|---|
| public UnitPreferences getUnitPreferences() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static HashMap | baseUnitToIndex
Maps from base unit to an index value: an index into the indexToCategory array. |
| pack-priv static String[] | indexToCategory
Our official array of category strings - categories are identified by indeces into this array. |
| Access | Constructor and Description |
|---|---|
| public |
| baseUnitToIndex | back to summary |
|---|---|
| pack-priv static HashMap<String, Integer> baseUnitToIndex Maps from base unit to an index value: an index into the indexToCategory array. | |
| indexToCategory | back to summary |
|---|---|
| pack-priv static String[] indexToCategory Our official array of category strings - categories are identified by indeces into this array. | |
| Categories | back to summary |
|---|---|
| public Categories() | |
unitQuantities in the
units resource to provide key->value lookups from base unit to
category, as well as preserving ordering information for these
categories. See units.txt.
For example: "kilogram" -> "mass", "meter-per-second" -> "speed".
In Java unitQuantity values are collected in order into an ArrayList,
while unitQuantity key-to-index lookups are handled with a HashMap.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv ArrayList | |
| pack-priv HashMap | mapFromUnitToIndex
Contains the map between units in their base units into their category. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | put(UResource.
Initially the key string of the enumeration-start resource.
Empty if the enumeration starts at the top level of the bundle.
Reuse for output values from Array and Table getters. key,Call getArray() or getTable() as appropriate.
Then reuse for output values from Array and Table getters. value,true if the bundle has no parent;
that is, its top-level table has the nofallback attribute,
or it is the root bundle of a locale tree. noFallback)Implements abstract com. |
| categories | back to summary |
|---|---|
| pack-priv ArrayList<String> categories | |
| mapFromUnitToIndex | back to summary |
|---|---|
| pack-priv HashMap<String, Integer> mapFromUnitToIndex Contains the map between units in their base units into their category. For example: meter-per-second --> "speed" | |
| CategoriesSink | back to summary |
|---|---|
| public CategoriesSink() | |
| put | back to summary |
|---|---|
| public void put(UResource. Implements abstract com. Doc from com. Called once for each bundle (child-parent-...-root). The value is normally an array or table resource, and implementations of this method normally iterate over the tree of resource items stored there.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| public |
| CATEGORY_TABLE_NAME | back to summary |
|---|---|
| public static final String CATEGORY_TABLE_NAME | |
| CONVERSION_UNIT_TABLE_NAME | back to summary |
|---|---|
| public static final String CONVERSION_UNIT_TABLE_NAME | |
| DEFAULT_REGION | back to summary |
|---|---|
| public static final String DEFAULT_REGION | |
| DEFAULT_USAGE | back to summary |
|---|---|
| public static final String DEFAULT_USAGE | |
| kCompoundPartOffset | back to summary |
|---|---|
| public static final int kCompoundPartOffset | |
| kInitialCompoundPartOffset | back to summary |
|---|---|
| public static final int kInitialCompoundPartOffset | |
| kPowerPartOffset | back to summary |
|---|---|
| public static final int kPowerPartOffset | |
| kPrefixOffset | back to summary |
|---|---|
| public static final int kPrefixOffset | |
| kSimpleUnitOffset | back to summary |
|---|---|
| public static final int kSimpleUnitOffset | |
| UNIT_PREFERENCE_TABLE_NAME | back to summary |
|---|---|
| public static final String UNIT_PREFERENCE_TABLE_NAME | |
| Constants | back to summary |
|---|---|
| public Constants() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int[] | |
| pack-priv String[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | put(UResource.
Initially the key string of the enumeration-start resource.
Empty if the enumeration starts at the top level of the bundle.
Reuse for output values from Array and Table getters. key,Call getArray() or getTable() as appropriate.
Then reuse for output values from Array and Table getters. value,true if the bundle has no parent;
that is, its top-level table has the nofallback attribute,
or it is the root bundle of a locale tree. noFallback)Implements abstract com. |
| simpleUnitCategories | back to summary |
|---|---|
| pack-priv int[] simpleUnitCategories | |
| simpleUnits | back to summary |
|---|---|
| pack-priv String[] simpleUnits | |
| SimpleUnitIdentifiersSink | back to summary |
|---|---|
| public SimpleUnitIdentifiersSink() | |
| put | back to summary |
|---|---|
| public void put(UResource. Implements abstract com. Doc from com. Called once for each bundle (child-parent-...-root). The value is normally an array or table resource, and implementations of this method normally iterate over the tree of resource items stored there.
| |