public final class FormattingResourceBundle extends ResourceBundle
Simple extension to ResourceBundle that handles message formatting via MessageFormat for values in the resource bundle.
ResourceBundle.Controlparent| Constructor and Description |
|---|
FormattingResourceBundle(ResourceBundle theResourceBundle)
Create a new FormattingResourceBundle
|
FormattingResourceBundle(String theName)
Create a new ResourceBundle
|
| Modifier and Type | Method and Description |
|---|---|
String |
get(String theKey,
Object... theArgs)
Return the string from the
ResourceBundle, optionally applying the provided args to the message via String.format(java.lang.String, java.lang.Object...). |
Enumeration<String> |
getKeys() |
protected Object |
handleGetObject(String key) |
clearCache, clearCache, containsKey, getBaseBundleName, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, handleKeySet, keySet, setParentpublic FormattingResourceBundle(ResourceBundle theResourceBundle)
theResourceBundle - the actual bundlepublic FormattingResourceBundle(String theName)
theName - the name of the bundle to loadpublic String get(String theKey, Object... theArgs)
ResourceBundle, optionally applying the provided args to the message via String.format(java.lang.String, java.lang.Object...).theKey - the message keytheArgs - the optiona list of args to apply to the messageprotected Object handleGetObject(String key)
handleGetObject in class ResourceBundlepublic Enumeration<String> getKeys()
getKeys in class ResourceBundleCopyright © 2010-2016 Stardog Union. All Rights Reserved.