java.lang.Object
java.util.ResourceBundle
com.aoapps.hodgepodge.i18n.ModifiableResourceBundle
- Direct Known Subclasses:
ModifiablePropertiesResourceBundle
A modifiable resource bundle allows the resources to be changed during
the execution of the application. It also keeps track of the modification
and verification times for the keys to help keep multiple translations
in sync throughout the lifetime of an application.
- Author:
- AO Industries, Inc.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.ResourceBundle
ResourceBundle.Control
-
Field Summary
Fields inherited from class java.util.ResourceBundle
parent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
handleRemoveKey
(String key) This will only be called on modifiable bundles.protected abstract void
handleSetObject
(String key, Object value, boolean modified) This will only be called on modifiable bundles.abstract boolean
Checks if this bundle is currently modifiable.final void
Removes a string.final void
Adds or updates the value associated with the provided key and sets the verified time to the current time.final void
final void
setStringArray
(String key, String[] value, boolean modified) Methods inherited from class java.util.ResourceBundle
clearCache, clearCache, containsKey, getBaseBundleName, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getKeys, getLocale, getObject, getString, getStringArray, handleGetObject, handleKeySet, keySet, setParent
-
Constructor Details
-
ModifiableResourceBundle
protected ModifiableResourceBundle()
-
-
Method Details
-
removeKey
Removes a string. -
handleRemoveKey
This will only be called on modifiable bundles.- See Also:
-
setString
- See Also:
-
setStringArray
- See Also:
-
setObject
Adds or updates the value associated with the provided key and sets the verified time to the current time. Ifmodified
istrue
, the modified time will also be updated, which will cause other locales to require verification. -
isModifiable
public abstract boolean isModifiable()Checks if this bundle is currently modifiable. -
handleSetObject
This will only be called on modifiable bundles.- See Also:
-