public abstract class

TimeZoneNamesBundle

extends OpenListResourceBundle
java.lang.Object
   ↳ java.util.ResourceBundle
     ↳ sun.util.resources.OpenListResourceBundle
       ↳ sun.util.resources.TimeZoneNamesBundle
Known Direct Subclasses

Class Overview

Subclass of ResourceBundle with special functionality for time zone names. The additional functionality:

  • Preserves the order of entries in the getContents array for the enumeration returned by getKeys.
  • Inserts the time zone ID (the key of the bundle entries) into the string arrays returned by handleGetObject.
      All TimeZoneNames resource bundles must extend this class and implement the getContents method.

Summary

[Expand]
Inherited Fields
From class java.util.ResourceBundle
Public Constructors
TimeZoneNamesBundle()
Public Methods
Object handleGetObject(String key)
Maps time zone IDs to locale-specific names.
Protected Methods
Map createMap(int size)
Use LinkedHashMap to preserve order of bundle entries.
abstract Object[][] getContents()
Provides key/value mappings for a specific resource bundle.
[Expand]
Inherited Methods
From class sun.util.resources.OpenListResourceBundle
From class java.util.ResourceBundle
From class java.lang.Object

Public Constructors

public TimeZoneNamesBundle ()

Public Methods

public Object handleGetObject (String key)

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 localized names come from the subclasses's getContents implementations, while the time zone ID is inserted into the returned array by this method.

Parameters
key the key for the desired object
Returns
  • the object for the given key, or null

Protected Methods

protected Map createMap (int size)

Use LinkedHashMap to preserve order of bundle entries.

protected abstract Object[][] 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.