Name
ListResourceBundle
Synopsis
This abstract class provides a simple way
to define a ResourceBundle. You may find it easier
to subclass ListResourceBundle than to subclass
ResourceBundle directly.
ListResourceBundle provides implementations for
the abstract handleGetObject( ) and
getKeys( ) methods defined by
ResourceBundle and adds its own abstract
getContents( ) method a subclass must override.
getContents( ) returns an Object[ ][
]—an array of arrays of objects. This array can have
any number of elements. Each element of this array must itself be an
array with two elements: the first element of each subarray should be
a String that specifies the name of a resource,
and the corresponding second element should be the value of that
resource; this value can be an Object of any
desired type. See also ResourceBundle and
PropertyResourceBundle.
Figure 16-41. java.util.ListResourceBundle
public abstract class ListResourceBundle extends ResourceBundle { // Public Constructors public ListResourceBundle( ); // Public Methods Overriding ResourceBundle public Enumeration<String> getKeys( ); public final Object handleGetObject(String key); // Protected Instance Methods protected abstract Object[ ][ ] getContents( ); }
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access