public static class UnitsData.CategoriesSink extends UResource.Sink
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.| Constructor and Description |
|---|
CategoriesSink() |
| Modifier and Type | Method and Description |
|---|---|
void |
put(UResource.Key key,
UResource.Value value,
boolean noFallback)
Called once for each bundle (child-parent-...-root).
|
public void put(UResource.Key key, UResource.Value value, boolean noFallback)
UResource.Sinkput in class UResource.Sinkkey - 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.value - Call getArray() or getTable() as appropriate.
Then reuse for output values from Array and Table getters.noFallback - 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.