Package com.ibm.icu.impl.units
Class UnitPreferences.UnitPreferencesSink
java.lang.Object
com.ibm.icu.impl.UResource.Sink
com.ibm.icu.impl.units.UnitPreferences.UnitPreferencesSink
- Enclosing class:
UnitPreferences
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate HashMap
<String, HashMap<String, UnitPreferences.UnitPreference[]>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
insertUnitPreferences
(String category, String usage, String region, UnitPreferences.UnitPreference[] unitPreferences) void
put
(UResource.Key key, UResource.Value value, boolean noFallback) The unitPreferenceData structure (see icu4c/source/data/misc/units.txt) contains a hierarchy of category/usage/region, within which are a set of preferences.
-
Field Details
-
mapToUnitPreferences
-
-
Constructor Details
-
UnitPreferencesSink
public UnitPreferencesSink()
-
-
Method Details
-
getMapToUnitPreferences
-
put
The unitPreferenceData structure (see icu4c/source/data/misc/units.txt) contains a hierarchy of category/usage/region, within which are a set of preferences. Hence three for-loops and another loop for the preferences themselves.- Specified by:
put
in classUResource.Sink
- Parameters:
key
- 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.
-
insertUnitPreferences
private void insertUnitPreferences(String category, String usage, String region, UnitPreferences.UnitPreference[] unitPreferences)
-