public class ResourceManager extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ResourceBundle |
bundle
The managed resource bundle
|
| Constructor and Description |
|---|
ResourceManager(ResourceBundle rb)
Creates a new resource manager
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBoolean(String key)
Returns the boolean mapped with the given key
|
int |
getCharacter(String key) |
int |
getInteger(String key)
Returns the integer mapped with the given string
|
String |
getString(String key)
Returns the string that is mapped with the given key
|
List |
getStringList(String key)
Returns the tokens that compose the string mapped
with the given key.
|
List |
getStringList(String key,
String delim)
Returns the tokens that compose the string mapped
with the given key.
|
List |
getStringList(String key,
String delim,
boolean returnDelims)
Returns the tokens that compose the string mapped
with the given key
|
protected ResourceBundle bundle
public ResourceManager(ResourceBundle rb)
rb - a resource bundlepublic String getString(String key) throws MissingResourceException
key - a key in the resource bundleMissingResourceException - if key is not the name of a resourcepublic List getStringList(String key) throws MissingResourceException
key - a key of the resource bundleMissingResourceException - if key is not the name of a resourcepublic List getStringList(String key, String delim) throws MissingResourceException
key - a key of the resource bundledelim - the delimiters of the tokensMissingResourceException - if key is not the name of a resourcepublic List getStringList(String key, String delim, boolean returnDelims) throws MissingResourceException
key - a key of the resource bundledelim - the delimiters of the tokensreturnDelims - if true, the delimiters are returned in the listMissingResourceException - if key is not the name of a resourcepublic boolean getBoolean(String key) throws MissingResourceException, ResourceFormatException
key - a key of the resource bundleMissingResourceException - if key is not the name of a resourceResourceFormatException - if the resource is malformedpublic int getInteger(String key) throws MissingResourceException, ResourceFormatException
key - a key of the resource bundleMissingResourceException - if key is not the name of a resourceResourceFormatException - if the resource is malformedpublic int getCharacter(String key) throws MissingResourceException, ResourceFormatException
Copyright © 2000–2021 Apache Software Foundation. All rights reserved.