APIdia Launch Partner
Top Description Constructors Methods
sun.util.resources

public abstract Class TimeZoneNamesBundle

extends OpenListResourceBundle
Class Inheritance
Known Direct Subclasses
sun.util.resources.cldr.TimeZoneNames, sun.util.resources.cldr.TimeZoneNames_en, sun.util.resources.TimeZoneNames
Imports
java.util.Map, .LinkedHashMap, .LinkedHashSet, .Set

Subclass of ResourceBundle with special functionality for time zone names. The additional functionality: All TimeZoneNames resource bundles must extend this class and implement the getContents method.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected <K, V> Map<K, V>
createMap(int size)

Overrides sun.util.resources.OpenListResourceBundle.createMap.

Use LinkedHashMap to preserve the order of bundle entries.

protected <
the type of elements
E
>
Set<E>

Returns:

a Set
createSet
()

Overrides sun.util.resources.OpenListResourceBundle.createSet.

Use LinkedHashSet to preserve the key order.

protected abstract Object[][]
getContents()

Implements abstract sun.util.resources.OpenListResourceBundle.getContents.

Provides key/value mappings for a specific resource bundle.

public Object
handleGetObject(String key)

Overrides sun.util.resources.OpenListResourceBundle.handleGetObject.

Maps time zone IDs to locale-specific names.

Inherited from sun.util.resources.OpenListResourceBundle:
getKeyshandleKeySetkeySet

Constructor Detail

TimeZoneNamesBundleback to summary
public TimeZoneNamesBundle()

Method Detail

createMapback to summary
protected <K, V> Map<K, V> createMap(int size)

Overrides sun.util.resources.OpenListResourceBundle.createMap.

Use LinkedHashMap to preserve the order of bundle entries.

Annotations
@Override
createSetback to summary
protected <E> Set<E> createSet()

Overrides sun.util.resources.OpenListResourceBundle.createSet.

Use LinkedHashSet to preserve the key order.

Parameters
<E>
the type of elements
Returns:Set<E>

a Set

Annotations
@Override
getContentsback to summary
protected abstract Object[][] getContents()

Implements abstract sun.util.resources.OpenListResourceBundle.getContents.

Provides key/value mappings for a specific resource bundle. Each entry of the array returned must be an array with two elements:

  • The key, which must be a string.
  • The value, which must be an array of four strings:
    • The long name of the time zone in standard time.
    • The short name of the time zone in standard time.
    • The long name of the time zone in daylight savings time.
    • The short name of the time zone in daylight savings time.
handleGetObjectback to summary
public Object handleGetObject(String key)

Overrides sun.util.resources.OpenListResourceBundle.handleGetObject.

Maps time zone IDs to locale-specific names. The value returned is an array of five strings:

  • The time zone ID (same as the key, not localized).
  • The long name of the time zone in standard time (localized).
  • The short name of the time zone in standard time (localized).
  • The long name of the time zone in daylight savings time (localized).
  • The short name of the time zone in daylight savings time (localized).
  • The long name of the time zone in generic form (localized).
  • The short name of the time zone in generic form (localized).
The localized names come from the subclasses's getContents implementations, while the time zone ID is inserted into the returned array by this method.
Annotations
@Override