java.util.ListResourceBundle
java.util.ResourceBundle
None
None
New as of JDK 1.1
The ListResourceBundle class is an abstract subclass of ResourceBundle that represents a list of resources for a locale. The resources are listed as a set of key/value pairs. Internally, a Hashtable is used for quick lookup of values. To subclass ListResourceBundle, all you need to do is override getContents() to return a two-dimensional array of Objects that contains the key/value pairs.
When ResourceBundle.getBundle() is called, it attempts to find a resource bundle that most closely matches a particular locale. This can be either a ListResourceBundle subclass or a property file, represented by a PropertyResourceBundle. Once the resource bundle has been retrieved, its contents can be used by the application to present locale-specific information.
PropertyResourceBundle inherits a lot of functionality from ResourceBundle; see the class description of ResourceBundle for more information.
public abstract class java.util.ListResourceBundle extends java.util.ResourceBundle { // Instance Methods public Enumeration getKeys(); public final Object handleGetObject(String key); // Protected Instance Methods protected abstract Object[][] getContents(); }
The keys in the resource bundle as an Enumeration.
ResourceBundle.getKeys()
This method returns an Enumeration that iterates through the keys in this ListResourceBundle.
The key of the resource to retrieve.
The resource that corresponds to this key.
ResourceBundle.handleGetObject()
This method returns the resource that corresponds to the given key. This method should not be called directly by your code. Your code should call ResourceBundle.getObject(), which may call the handleGetObject() objects of multiple subclasses of ResourceBundle looking for a particular resource. Calling handleGetObject() directly only finds resources in the object associated with the method.
The key/value pairs that represent the resources as a two-dimensional array.
This method returns a two-dimensional Object array that contains all the key/value pairs for this ListResourceBundle.
Method |
Inherited From |
Method |
Inherited From |
---|---|---|---|
clone() |
Object |
equals(Object) |
Object |
finalize() |
Object |
getClass() |
Object |
getObject(String) |
ResourceBundle |
getString(String) |
ResourceBundle |
getStringArray(String) |
ResourceBundle |
hashCode() |
Object |
notify() |
Object |
notifyAll() |
Object |
setParent(ResourceBundle) |
ResourceBundle |
toString() |
Object |
wait() |
Object |
wait(long) |
Object |
wait(long, int) |
Object |
Enumeration, Hashtable, PropertyResourceBundle, ResourceBundle
This HTML Help has been published using the chm2web software. |