Class UnitPreferences.UnitPreferencesSink

    • Field Detail

      • mapToUnitPreferences

        private java.util.HashMap<java.lang.String,​java.util.HashMap<java.lang.String,​UnitPreferences.UnitPreference[]>> mapToUnitPreferences
    • Constructor Detail

      • UnitPreferencesSink

        public UnitPreferencesSink()
    • Method Detail

      • getMapToUnitPreferences

        public java.util.HashMap<java.lang.String,​java.util.HashMap<java.lang.String,​UnitPreferences.UnitPreference[]>> getMapToUnitPreferences()
      • put

        public 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. Hence three for-loops and another loop for the preferences themselves.
        Specified by:
        put in class UResource.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​(java.lang.String category,
                                           java.lang.String usage,
                                           java.lang.String region,
                                           UnitPreferences.UnitPreference[] unitPreferences)