| Modifier and Type | Class and Description |
|---|---|
| private static class | TimeZoneGenericNames.Cache
|
| public static class | TimeZoneGenericNames.GenericMatchInfo
A class used for returning the name search result used by
|
| private static class | TimeZoneGenericNames.GenericNameSearchHandler
A private class implementing the search callback interface in
|
| public static enum | TimeZoneGenericNames.GenericNameType
Generic name type enum |
| private static class | TimeZoneGenericNames.NameInfo
A private class used for storing the name information in the local trie. |
| public static enum | TimeZoneGenericNames.Pattern
Format pattern enum used for composing location and partial location names |
| Modifier and Type | Field and Description |
|---|---|
| private transient volatile boolean | |
| private transient ConcurrentHashMap | |
| private transient ConcurrentHashMap | |
| private transient TextTrieMap | |
| private transient boolean | |
| private final ULocale | |
| private transient WeakReference | |
| private transient MessageFormat[] | |
| private transient String | |
| private TimeZoneNames | |
| private static final long | |
| private static TimeZoneGenericNames. | |
| private static final TimeZoneNames. | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | TimeZoneGenericNames(ULocale
the locale locale, TimeZoneNames the TimeZoneNames tznames)Constructs a |
| private | TimeZoneGenericNames(ULocale
the locale locale)Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| public TimeZoneGenericNames | cloneAsThawed()
Implements com. |
| private TimeZoneGenericNames. | Returns: A GenericMatchInfothe MatchInfo matchInfoReturns a |
| public Collection | Returns: A collection of match info.the text text, int the start offset in the text start, EnumSet<TimeZoneGenericNames.the set of name types. genericTypesReturns a collection of time zone display name matches for the specified types in the given text at the given offset. |
| public TimeZoneGenericNames. | Returns: the best matching name info.the text text, int the start offset in the text start, EnumSet<TimeZoneGenericNames.the set of name types. genericTypesReturns the best match of time zone display name for the specified types in the given text at the given offset. |
| private synchronized Collection | Returns: A collection of match info.the text text, int the start offset in the text start, EnumSet<TimeZoneGenericNames.the set of name types. typesReturns a collection of time zone display name matches for the specified types in the given text at the given offset. |
| private Collection | Returns: A collection of match info.the text text, int the start offset in the text start, EnumSet<TimeZoneGenericNames.the set of name types. typesReturns a collection of time zone display name matches for the specified types in the given text at the given offset. |
| private String | Returns: the name used for a generic name type, which could be the generic name, or the standard name (if the zone does not observes DST around the date), or the partial location name.the requested time zone tz, TimeZoneGenericNames.the generic name type, either LONG or SHORT type,the date date)Private method to get a generic string, with fallback logics involved, that is, 1. |
| private synchronized String | Returns: the formatted stringthe message pattern enum pat,the format argument(s) args)Private simple pattern formatter used for formatting generic location names and partial location names. |
| public TimeZoneGenericNames | |
| public String | Returns: the display name of the time zone for the given name type at the given date, or null.the time zone tz, TimeZoneGenericNames.the generic name type - see type,GenericNameTypethe date date)Returns the display name of the time zone for the given name type at the given date, or null if the display name is not available. |
| public String | Returns: the generic location name for the given canonical time zone ID.the canonical time zone ID canonicalTzID)Returns the generic location name for the given canonical time zone ID. |
| public static TimeZoneGenericNames | Returns: A frozenTimeZoneGenericNames.the locale locale)The factory method of |
| private synchronized LocaleDisplayNames | Returns: the instance of LocaleDisplayNames for the locale of this object.Private method returning LocaleDisplayNames instance for the locale of this instance. |
| private String | Returns: the partial location format stringthe canonical time zone ID tzID, String the meta zone ID mzID, boolean true when long generic name isLong, String the meta zone generic display name mzDisplayName)Private method for formatting partial location names. |
| private synchronized String | |
| private void | |
| public boolean | isFrozen()
Implements com. |
| private synchronized void | |
| private void | |
| public TimeZoneGenericNames | Returns: this object.the pattern type patType,the pattern string patStr)Sets the pattern string for the pattern type. |
| _frozen | back to summary |
|---|---|
| private transient volatile boolean _frozen | |
| _genericLocationNamesMap | back to summary |
|---|---|
| private transient ConcurrentHashMap<String, String> _genericLocationNamesMap | |
| _genericPartialLocationNamesMap | back to summary |
|---|---|
| private transient ConcurrentHashMap<String, String> _genericPartialLocationNamesMap | |
| _gnamesTrie | back to summary |
|---|---|
| private transient TextTrieMap<TimeZoneGenericNames. | |
| _gnamesTrieFullyLoaded | back to summary |
|---|---|
| private transient boolean _gnamesTrieFullyLoaded | |
| _locale | back to summary |
|---|---|
| private final ULocale _locale | |
| _localeDisplayNamesRef | back to summary |
|---|---|
| private transient WeakReference<LocaleDisplayNames> _localeDisplayNamesRef | |
| _patternFormatters | back to summary |
|---|---|
| private transient MessageFormat[] _patternFormatters | |
| _region | back to summary |
|---|---|
| private transient String _region | |
| _tznames | back to summary |
|---|---|
| private TimeZoneNames _tznames | |
| DST_CHECK_RANGE | back to summary |
|---|---|
| private static final long DST_CHECK_RANGE | |
| GENERIC_NAMES_CACHE | back to summary |
|---|---|
| private static TimeZoneGenericNames. | |
| GENERIC_NON_LOCATION_TYPES | back to summary |
|---|---|
| private static final TimeZoneNames. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| TimeZoneGenericNames | back to summary |
|---|---|
| public TimeZoneGenericNames(ULocale locale, TimeZoneNames tznames) Constructs a
| |
| TimeZoneGenericNames | back to summary |
|---|---|
| private TimeZoneGenericNames(ULocale locale) Constructs a
| |
| cloneAsThawed | back to summary |
|---|---|
| public TimeZoneGenericNames cloneAsThawed() Implements com. Doc from com. Provides for the clone operation. Any clone is initially unfrozen.
| |
| createGenericMatchInfo | back to summary |
|---|---|
| private TimeZoneGenericNames. Returns a
| |
| find | back to summary |
|---|---|
| public Collection Returns a collection of time zone display name matches for the specified types in the given text at the given offset.
| |
| findBestMatch | back to summary |
|---|---|
| public TimeZoneGenericNames. Returns the best match of time zone display name for the specified types in the given text at the given offset.
| |
| findLocal | back to summary |
|---|---|
| private synchronized Collection Returns a collection of time zone display name matches for the specified types in the given text at the given offset. This method only finds matches from the local trie, that contains 1) generic location names and 2) long/short generic partial location names, used by this object.
| |
| findTimeZoneNames | back to summary |
|---|---|
| private Collection Returns a collection of time zone display name matches for the specified types in the given text at the given offset. This method only finds matches from the TimeZoneNames used by this object.
| |
| formatGenericNonLocationName | back to summary |
|---|---|
| private String formatGenericNonLocationName(TimeZone tz, TimeZoneGenericNames. Private method to get a generic string, with fallback logics involved, that is, 1. If a generic non-location string is available for the zone, return it. 2. If a generic non-location string is associated with a meta zone and the zone never use daylight time around the given date, use the standard string (if available). 3. If a generic non-location string is associated with a meta zone and the offset at the given time is different from the preferred zone for the current locale, then return the generic partial location string (if available) 4. If a generic non-location string is not available, use generic location string.
| |
| formatPattern | back to summary |
|---|---|
| private synchronized String formatPattern(TimeZoneGenericNames. Private simple pattern formatter used for formatting generic location names and partial location names. We intentionally use JDK MessageFormat for performance reason.
| |
| freeze | back to summary |
|---|---|
| public TimeZoneGenericNames freeze() Implements com. Doc from com. Freezes the object.
| |
| getDisplayName | back to summary |
|---|---|
| public String getDisplayName(TimeZone tz, TimeZoneGenericNames. Returns the display name of the time zone for the given name type at the given date, or null if the display name is not available.
| |
| getGenericLocationName | back to summary |
|---|---|
| public String getGenericLocationName(String canonicalTzID) Returns the generic location name for the given canonical time zone ID. | |
| getInstance | back to summary |
|---|---|
| public static TimeZoneGenericNames getInstance(ULocale locale) The factory method of
| |
| getLocaleDisplayNames | back to summary |
|---|---|
| private synchronized LocaleDisplayNames getLocaleDisplayNames() Private method returning LocaleDisplayNames instance for the locale of this instance. Because LocaleDisplayNames is only used for generic location format and partial location format, the LocaleDisplayNames is instantiated lazily.
| |
| getPartialLocationName | back to summary |
|---|---|
| private String getPartialLocationName(String tzID, String mzID, boolean isLong, String mzDisplayName) Private method for formatting partial location names. This format is used when a generic name of a meta zone is available, but the given time zone is not a reference zone (golden zone) of the meta zone. | |
| getTargetRegion | back to summary |
|---|---|
| private synchronized String getTargetRegion() Private method returning the target region. The target regions is determined by the locale of this instance. When a generic name is coming from a meta zone, this region is used for checking if the time zone is a reference zone of the meta zone.
| |
| init | back to summary |
|---|---|
| private void init() Private method initializing the instance of | |
| isFrozen | back to summary |
|---|---|
| public boolean isFrozen() Implements com. Doc from com. Determines whether the object has been frozen or not.
| |
| loadStrings | back to summary |
|---|---|
| private synchronized void loadStrings(String tzCanonicalID) | |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException | |
| setFormatPattern | back to summary |
|---|---|
| public TimeZoneGenericNames setFormatPattern(TimeZoneGenericNames. Sets the pattern string for the pattern type. Note This method is designed for CLDR ST - not for common use.
| |
TimeZoneGenericNames cache implementation.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected TimeZoneGenericNames | createInstance(String
Cache lookup key for the requested instance key, ULocale Data for the instance creation data)Implements abstract com. |
| Cache | back to summary |
|---|---|
| private Cache() | |
| createInstance | back to summary |
|---|---|
| protected TimeZoneGenericNames createInstance(String key, ULocale data) Implements abstract com. Doc from com. Creates an instance for the key and data. Must be overridden.
| |
TimeZoneGenericNames#find(String, int, EnumSet).
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final TimeZoneGenericNames. | |
| pack-priv final TimeZoneFormat. | |
| pack-priv final String |
| Access | Constructor and Description |
|---|---|
| private | |
| private | GenericMatchInfo(TimeZoneGenericNames.
|
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public TimeZoneGenericNames. | |
| public TimeZoneFormat. | |
| public String |
| matchLength | back to summary |
|---|---|
| pack-priv final int matchLength | |
| nameType | back to summary |
|---|---|
| pack-priv final TimeZoneGenericNames. | |
| timeType | back to summary |
|---|---|
| pack-priv final TimeZoneFormat. | |
| tzID | back to summary |
|---|---|
| pack-priv final String tzID | |
| GenericMatchInfo | back to summary |
|---|---|
| private GenericMatchInfo(TimeZoneGenericNames. | |
| GenericMatchInfo | back to summary |
|---|---|
| private GenericMatchInfo(TimeZoneGenericNames. | |
| matchLength | back to summary |
|---|---|
| public int matchLength() | |
| nameType | back to summary |
|---|---|
| public TimeZoneGenericNames. | |
| timeType | back to summary |
|---|---|
| public TimeZoneFormat. | |
| tzID | back to summary |
|---|---|
| public String tzID() | |
TextTrieMap for collecting match results.
| Modifier and Type | Field and Description |
|---|---|
| private Collection | |
| private int | |
| private EnumSet |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Collection | |
| public int | Returns: the maximum match lengthReturns the maximum match length, or 0 if no match was found |
| public boolean | handlePrefixMatch(int
Matched key's length matchLength, Iterator<TimeZoneGenericNames.An iterator of the objects associated with the matched key valuesImplements com. |
| public void |
| _matches | back to summary |
|---|---|
| private Collection<TimeZoneGenericNames. | |
| _maxMatchLen | back to summary |
|---|---|
| private int _maxMatchLen | |
| _types | back to summary |
|---|---|
| private EnumSet<TimeZoneGenericNames. | |
| GenericNameSearchHandler | back to summary |
|---|---|
| pack-priv GenericNameSearchHandler(EnumSet<TimeZoneGenericNames. | |
| getMatches | back to summary |
|---|---|
| public Collection Returns the match results
| |
| getMaxMatchLen | back to summary |
|---|---|
| public int getMaxMatchLen() Returns the maximum match length, or 0 if no match was found
| |
| handlePrefixMatch | back to summary |
|---|---|
| public boolean handlePrefixMatch(int matchLength, Iterator<TimeZoneGenericNames. Implements com. Doc from com. Handles a prefix key match
| |
| resetResults | back to summary |
|---|---|
| public void resetResults() Resets the match results | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv String[] | |
| public static final TimeZoneGenericNames. | |
| public static final TimeZoneGenericNames. | |
| public static final TimeZoneGenericNames. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public static TimeZoneGenericNames. | |
| public static TimeZoneGenericNames. |
| _fallbackTypeOf | back to summary |
|---|---|
| pack-priv String[] _fallbackTypeOf | |
| LOCATION | back to summary |
|---|---|
| public static final TimeZoneGenericNames. | |
| LONG | back to summary |
|---|---|
| public static final TimeZoneGenericNames. | |
| SHORT | back to summary |
|---|---|
| public static final TimeZoneGenericNames. | |
| GenericNameType | back to summary |
|---|---|
| private GenericNameType(String... fallbackTypeOf) | |
| isFallbackTypeOf | back to summary |
|---|---|
| public boolean isFallbackTypeOf(TimeZoneGenericNames. | |
| valueOf | back to summary |
|---|---|
| public static TimeZoneGenericNames. | |
| values | back to summary |
|---|---|
| public static TimeZoneGenericNames. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final TimeZoneGenericNames. | |
| pack-priv final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| type | back to summary |
|---|---|
| pack-priv final TimeZoneGenericNames. | |
| tzID | back to summary |
|---|---|
| pack-priv final String tzID | |
| NameInfo | back to summary |
|---|---|
| pack-priv NameInfo(String tzID, TimeZoneGenericNames. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv String | |
| pack-priv String | |
| public static final TimeZoneGenericNames. | |
| public static final TimeZoneGenericNames. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv String | |
| pack-priv String | |
| public static TimeZoneGenericNames. | |
| public static TimeZoneGenericNames. |
| _defaultVal | back to summary |
|---|---|
| pack-priv String _defaultVal | |
| _key | back to summary |
|---|---|
| pack-priv String _key | |
| FALLBACK_FORMAT | back to summary |
|---|---|
| public static final TimeZoneGenericNames. | |
| REGION_FORMAT | back to summary |
|---|---|
| public static final TimeZoneGenericNames. | |
| Pattern | back to summary |
|---|---|
| private Pattern(String key, String defaultVal) | |
| defaultValue | back to summary |
|---|---|
| pack-priv String defaultValue() | |
| key | back to summary |
|---|---|
| pack-priv String key() | |
| valueOf | back to summary |
|---|---|
| public static TimeZoneGenericNames. | |
| values | back to summary |
|---|---|
| public static TimeZoneGenericNames. | |