public class TimeZoneNamesImpl extends TimeZoneNames
TimeZoneNames.MatchInfo, TimeZoneNames.NameType| Constructor and Description |
|---|
TimeZoneNamesImpl(ULocale locale) |
| Modifier and Type | Method and Description |
|---|---|
Collection<TimeZoneNames.MatchInfo> |
find(CharSequence text,
int start,
EnumSet<TimeZoneNames.NameType> nameTypes)
Finds time zone name prefix matches for the input text at the
given offset and returns a collection of the matches.
|
Set<String> |
getAvailableMetaZoneIDs()
Returns an immutable set of all available meta zone IDs.
|
Set<String> |
getAvailableMetaZoneIDs(String tzID)
Returns an immutable set of all available meta zone IDs used by the given time zone.
|
static String |
getDefaultExemplarLocationName(String tzID)
Default exemplar location name based on time zone ID.
|
void |
getDisplayNames(String tzID,
TimeZoneNames.NameType[] types,
long date,
String[] dest,
int destOffset) |
String |
getExemplarLocationName(String tzID)
Returns the exemplar location name for the given time zone.
|
String |
getMetaZoneDisplayName(String mzID,
TimeZoneNames.NameType type)
Returns the display name of the meta zone.
|
String |
getMetaZoneID(String tzID,
long date)
Returns the meta zone ID for the given canonical time zone ID at the given date.
|
String |
getReferenceZoneID(String mzID,
String region)
Returns the reference zone ID for the given meta zone ID for the region.
|
String |
getTimeZoneDisplayName(String tzID,
TimeZoneNames.NameType type)
Returns the display name of the time zone.
|
void |
loadAllDisplayNames() |
getDisplayName, getInstance, getInstance, getTZDBInstancepublic TimeZoneNamesImpl(ULocale locale)
public Set<String> getAvailableMetaZoneIDs()
TimeZoneNamesgetAvailableMetaZoneIDs in class TimeZoneNamespublic Set<String> getAvailableMetaZoneIDs(String tzID)
TimeZoneNamesgetAvailableMetaZoneIDs in class TimeZoneNamestzID - The canonical time zone ID.public String getMetaZoneID(String tzID, long date)
TimeZoneNamesgetMetaZoneID in class TimeZoneNamestzID - The canonical time zone ID.date - The date.public String getReferenceZoneID(String mzID, String region)
TimeZoneNamesgetReferenceZoneID in class TimeZoneNamesmzID - The meta zone ID.region - The region.public String getMetaZoneDisplayName(String mzID, TimeZoneNames.NameType type)
TimeZoneNamesgetMetaZoneDisplayName in class TimeZoneNamesmzID - The meta zone ID.type - The display name type. See TimeZoneNames.NameType.public String getTimeZoneDisplayName(String tzID, TimeZoneNames.NameType type)
TimeZoneNamesTimeZoneNames.getDisplayName(String, NameType, long),
this method does not get a name from a meta zone used by the time zone.getTimeZoneDisplayName in class TimeZoneNamestzID - The canonical time zone ID.type - The display name type. See TimeZoneNames.NameType.public String getExemplarLocationName(String tzID)
TimeZoneNamesgetExemplarLocationName in class TimeZoneNamestzID - The canonical time zone IDpublic Collection<TimeZoneNames.MatchInfo> find(CharSequence text, int start, EnumSet<TimeZoneNames.NameType> nameTypes)
TimeZoneNamesfind in class TimeZoneNamestext - the text.start - the starting offset within the text.nameTypes - the set of name types, or null for all name types.TimeZoneNames.NameType,
TimeZoneNames.MatchInfopublic void loadAllDisplayNames()
loadAllDisplayNames in class TimeZoneNamespublic void getDisplayNames(String tzID, TimeZoneNames.NameType[] types, long date, String[] dest, int destOffset)
getDisplayNames in class TimeZoneNamespublic static String getDefaultExemplarLocationName(String tzID)
tzID - the time zone ID