public class ResourceManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ResourceBundle |
bundle
The managed resource bundle
|
| Constructor and Description |
|---|
ResourceManager(java.util.ResourceBundle rb)
Creates a new resource manager
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBoolean(java.lang.String key)
Returns the boolean mapped with the given key
|
int |
getCharacter(java.lang.String key) |
int |
getInteger(java.lang.String key)
Returns the integer mapped with the given string
|
java.lang.String |
getString(java.lang.String key)
Returns the string that is mapped with the given key
|
java.util.List |
getStringList(java.lang.String key)
Returns the tokens that compose the string mapped
with the given key.
|
java.util.List |
getStringList(java.lang.String key,
java.lang.String delim)
Returns the tokens that compose the string mapped
with the given key.
|
java.util.List |
getStringList(java.lang.String key,
java.lang.String delim,
boolean returnDelims)
Returns the tokens that compose the string mapped
with the given key
|
public ResourceManager(java.util.ResourceBundle rb)
rb - a resource bundlepublic java.lang.String getString(java.lang.String key)
throws java.util.MissingResourceException
key - a key in the resource bundlejava.util.MissingResourceException - if key is not the name of a resourcepublic java.util.List getStringList(java.lang.String key)
throws java.util.MissingResourceException
key - a key of the resource bundlejava.util.MissingResourceException - if key is not the name of a resourcepublic java.util.List getStringList(java.lang.String key,
java.lang.String delim)
throws java.util.MissingResourceException
key - a key of the resource bundledelim - the delimiters of the tokensjava.util.MissingResourceException - if key is not the name of a resourcepublic java.util.List getStringList(java.lang.String key,
java.lang.String delim,
boolean returnDelims)
throws java.util.MissingResourceException
key - a key of the resource bundledelim - the delimiters of the tokensreturnDelims - if true, the delimiters are returned in the listjava.util.MissingResourceException - if key is not the name of a resourcepublic boolean getBoolean(java.lang.String key)
throws java.util.MissingResourceException,
ResourceFormatException
key - a key of the resource bundlejava.util.MissingResourceException - if key is not the name of a resourceResourceFormatException - if the resource is malformedpublic int getInteger(java.lang.String key)
throws java.util.MissingResourceException,
ResourceFormatException
key - a key of the resource bundlejava.util.MissingResourceException - if key is not the name of a resourceResourceFormatException - if the resource is malformedpublic int getCharacter(java.lang.String key)
throws java.util.MissingResourceException,
ResourceFormatException
java.util.MissingResourceExceptionResourceFormatExceptionCopyright ? 2009 Apache Software Foundation. All Rights Reserved.