public final class MockResourceBundle extends ResourceBundle
ResourceBundle.
Contains no translations by default and returns the key itself.
But you can add your own mappings.ResourceBundle.Controlparent| Constructor and Description |
|---|
MockResourceBundle(String baseName,
Locale locale) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseName() |
Enumeration<String> |
getKeys() |
Locale |
getLocale() |
protected Object |
handleGetObject(String key) |
Set<String> |
keySet() |
void |
put(@NotNull String key,
@NotNull String value)
Add translation.
|
void |
putAll(@NotNull Map<? extends String,? extends String> map)
Add translations.
|
clearCache, clearCache, containsKey, getBaseBundleName, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getObject, getString, getStringArray, handleKeySet, setParentpublic Locale getLocale()
getLocale in class ResourceBundleprotected Object handleGetObject(String key)
handleGetObject in class ResourceBundlepublic Set<String> keySet()
keySet in class ResourceBundlepublic Enumeration<String> getKeys()
getKeys in class ResourceBundlepublic String getBaseName()
public void put(@NotNull
@NotNull String key,
@NotNull
@NotNull String value)
key - Keyvalue - ValueCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.