Package com.ibm.icu.impl
Class TimeZoneNamesImpl.ZoneStringsLoader
- java.lang.Object
-
- com.ibm.icu.impl.UResource.Sink
-
- com.ibm.icu.impl.TimeZoneNamesImpl.ZoneStringsLoader
-
- Enclosing class:
- TimeZoneNamesImpl
private final class TimeZoneNamesImpl.ZoneStringsLoader extends UResource.Sink
Loads all meta zone and time zone names for this TimeZoneNames' locale.
-
-
Field Summary
Fields Modifier and Type Field Description private static int
INITIAL_NUM_ZONES
Prepare for several hundred time zones and meta zones.private java.util.HashMap<UResource.Key,TimeZoneNamesImpl.ZNamesLoader>
keyToLoader
private java.lang.StringBuilder
sb
-
Constructor Summary
Constructors Modifier Constructor Description private
ZoneStringsLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
consumeNamesTable(UResource.Key key, UResource.Value value, boolean noFallback)
(package private) UResource.Key
createKey(UResource.Key key)
(package private) boolean
isMetaZone(UResource.Key key)
(package private) void
load()
Caller must synchronize.private java.lang.String
mzIDFromKey(UResource.Key key)
Equivalent to key.substring(MZ_PREFIX.length()) except reuses our StringBuilder.void
put(UResource.Key key, UResource.Value value, boolean noFallback)
Called once for each bundle (child-parent-...-root).private java.lang.String
tzIDFromKey(UResource.Key key)
-
-
-
Field Detail
-
INITIAL_NUM_ZONES
private static final int INITIAL_NUM_ZONES
Prepare for several hundred time zones and meta zones. _zoneStrings.getSize() is ineffective in a sparsely populated locale like en-GB.- See Also:
- Constant Field Values
-
keyToLoader
private java.util.HashMap<UResource.Key,TimeZoneNamesImpl.ZNamesLoader> keyToLoader
-
sb
private java.lang.StringBuilder sb
-
-
Method Detail
-
load
void load()
Caller must synchronize.
-
put
public void put(UResource.Key key, UResource.Value value, boolean noFallback)
Description copied from class:UResource.Sink
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.- 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.
-
consumeNamesTable
private void consumeNamesTable(UResource.Key key, UResource.Value value, boolean noFallback)
-
createKey
UResource.Key createKey(UResource.Key key)
-
isMetaZone
boolean isMetaZone(UResource.Key key)
-
mzIDFromKey
private java.lang.String mzIDFromKey(UResource.Key key)
Equivalent to key.substring(MZ_PREFIX.length()) except reuses our StringBuilder.
-
tzIDFromKey
private java.lang.String tzIDFromKey(UResource.Key key)
-
-