net.rim.device.api.i18n
Class HashResourceBundle

java.lang.Object
  extended by net.rim.device.api.i18n.ResourceBundle
      extended by net.rim.device.api.i18n.HashResourceBundle

public class HashResourceBundle
extends ResourceBundle

Contains locale-specific objects, with primary use of integer keys.


Constructor Summary
HashResourceBundle(Locale locale)
          Constructs new HashResourceBundle instance for locale.
 
Method Summary
protected  Object handleGetObject(int key)
          Retrieves resource object by key.
 void put(int key, Object value)
          Updates value for resource object.
 
Methods inherited from class net.rim.device.api.i18n.ResourceBundle
getBundle, getBundle, getBundle, getFamily, getLocale, getObject, getObject, getString, getStringArray
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

HashResourceBundle

public HashResourceBundle(Locale locale)
Constructs new HashResourceBundle instance for locale.

Parameters:
locale - Locale for this resource bundle.


Method Detail

handleGetObject

protected Object handleGetObject(int key)
                          throws MissingResourceException
Retrieves resource object by key.

Specified by:
handleGetObject in class ResourceBundle
Parameters:
key - Integer key associated with resource object.
Returns:
Resource object associated with integer key.
Throws:
MissingResourceException - If the object associated with the key not found.

put

public void put(int key,
                Object value)
Updates value for resource object.

Invoke this method to add or adds or replaces a key-value pair. Using null for the value will remove the pair the map.

Parameters:
key - Integer key for resource object.
value - New resource object for provided key; if you pass null for this parameter, this parameter removes the resource object if one already existed, or simply does not add it to the bundle.





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal