Top Description Inners Fields Constructors Methods
com.ibm.icu.impl

public Class TimeZoneNamesImpl

extends TimeZoneNames
Class Inheritance
Imports
java.io.IOException, .ObjectInputStream, .ObjectOutputStream, java.util.ArrayList, .Arrays, .Collection, .Collections, .EnumSet, .HashMap, .HashSet, .Iterator, .LinkedList, .List, .Map, .MissingResourceException, .Set, java.util.concurrent.ConcurrentHashMap, java.util.regex.Pattern, com.ibm.icu.impl.TextTrieMap.ResultHandler, com.ibm.icu.text.TimeZoneNames, com.ibm.icu.util.TimeZone, .TimeZone.SystemTimeZoneType, .ULocale, .UResourceBundle

The standard ICU implementation of TimeZoneNames

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
TimeZoneNamesImpl.NameInfo

An instance of NameInfo is stored in the zone names trie.

private static class
TimeZoneNamesImpl.NameSearchHandler

NameSearchHandler is used for collecting name matches.

private static class
private static class
TimeZoneNamesImpl.ZNames

This class stores name data for a meta zone or time zone.

private static class
private class
TimeZoneNamesImpl.ZoneStringsLoader

Loads all meta zone and time zone names for this TimeZoneNames' locale.

Field Summary

Modifier and TypeField and Description
private transient ConcurrentHashMap<String, TimeZoneNamesImpl.ZNames>
private transient boolean
private transient TextTrieMap<TimeZoneNamesImpl.NameInfo>
private transient boolean
private transient ConcurrentHashMap<String, TimeZoneNamesImpl.ZNames>
private transient ICUResourceBundle
private static final Pattern
private static volatile Set<String>
private static final String
private static final TimeZoneNamesImpl.MZ2TZsCache
private static final long
private static final TimeZoneNamesImpl.TZ2MZsCache
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static Set<String>
pack-priv static Set<String>
pack-priv static String
_getMetaZoneID(String tzID, long date)

pack-priv static String
private void
addAllNamesIntoTrie()

Caller must synchronize.

private Collection<TimeZoneNames.MatchInfo>
public synchronized Collection<TimeZoneNames.MatchInfo>
find(CharSequence
the text.
text
,
int
the starting offset within the text.
start
,
EnumSet<TimeZoneNames.NameType>
the set of name types, or null for all name types.
nameTypes
)

Overrides com.ibm.icu.text.TimeZoneNames.find.

Finds time zone name prefix matches for the input text at the given offset and returns a collection of the matches.
public Set<String>
getAvailableMetaZoneIDs()

Implements abstract com.ibm.icu.text.TimeZoneNames.getAvailableMetaZoneIDs.

Returns an immutable set of all available meta zone IDs.
public Set<String>
getAvailableMetaZoneIDs(String
The canonical time zone ID.
tzID
)

Implements abstract com.ibm.icu.text.TimeZoneNames.getAvailableMetaZoneIDs.

Returns an immutable set of all available meta zone IDs used by the given time zone.
public static String

Returns:

the exemplar location name or null if location is not available.
getDefaultExemplarLocationName
(String
the time zone ID
tzID
)

Default exemplar location name based on time zone ID. For example, "America/New_York" -> "New York"

public void
getDisplayNames(String tzID, TimeZoneNames.NameType[] types, long date, String[] dest, int destOffset)

Overrides com.ibm.icu.text.TimeZoneNames.getDisplayNames.

public String
getExemplarLocationName(String
The canonical time zone ID
tzID
)

Overrides com.ibm.icu.text.TimeZoneNames.getExemplarLocationName.

Returns the exemplar location name for the given time zone.
public String
getMetaZoneDisplayName(String
The meta zone ID.
mzID
,
TimeZoneNames.NameType
The display name type. See TimeZoneNames.NameType.
type
)

Implements abstract com.ibm.icu.text.TimeZoneNames.getMetaZoneDisplayName.

Returns the display name of the meta zone.
public String
getMetaZoneID(String
The canonical time zone ID.
tzID
,
long
The date.
date
)

Implements abstract com.ibm.icu.text.TimeZoneNames.getMetaZoneID.

Returns the meta zone ID for the given canonical time zone ID at the given date.
public String
getReferenceZoneID(String
The meta zone ID.
mzID
,
String
The region.
region
)

Implements abstract com.ibm.icu.text.TimeZoneNames.getReferenceZoneID.

Returns the reference zone ID for the given meta zone ID for the region.
public String
getTimeZoneDisplayName(String
The canonical time zone ID.
tzID
,
TimeZoneNames.NameType
The display name type. See TimeZoneNames.NameType.
type
)

Implements abstract com.ibm.icu.text.TimeZoneNames.getTimeZoneDisplayName.

Returns the display name of the time zone.
private void
initialize(ULocale
The locale
locale
)

Initialize the transient fields, called from the constructor and readObject.

private void
internalLoadAllDisplayNames()

Caller must synchronize.

public synchronized void
private synchronized TimeZoneNamesImpl.ZNames

Returns:

An instance of ZNames that includes a set of meta zone display names.
loadMetaZoneNames
(String
the meta zone ID
mzID
)

Returns a set of names for the given meta zone ID. This method loads the set of names into the internal map and trie for future references.

private synchronized void
loadStrings(String
the canonical time zone ID
tzCanonicalID
)

Load all strings used by the specified time zone.

private synchronized TimeZoneNamesImpl.ZNames

Returns:

An instance of ZNames that includes a set of time zone display names.
loadTimeZoneNames
(String
the canonical time zone ID
tzID
)

Returns a set of names for the given time zone ID. This method loads the set of names into the internal map and trie for future references.

private void
private void
Inherited from com.ibm.icu.text.TimeZoneNames:
getDisplayNamegetInstancegetInstancegetTZDBInstance