public class Messages extends Object
Modifier and Type | Field and Description |
---|---|
static Locale |
DEFAULT_LOCALE
Default Locale
|
Constructor and Description |
---|
Messages(String bundleName)
Constructor using default Locale (FRENCH)
|
Messages(String bundleName,
Locale locale)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(String key)
Determines whether the given
key is contained in this ResourceBundle or its parent
bundles. |
Map<String,String> |
getAllMessages()
Retrieve all the messages
|
Locale |
getLocale() |
String |
getString(String key) |
String |
getString(String key,
Object... args) |
String |
getStringNotEmpty(String key,
Object... args) |
public static final Locale DEFAULT_LOCALE
public Messages(String bundleName)
bundleName
- the bundle namepublic Map<String,String> getAllMessages()
public final String getString(String key)
key
- the key of the messagepublic final String getString(String key, Object... args)
key
- the key of the messageargs
- the arguments to use as MessageFormat.format(mesg, args)public final String getStringNotEmpty(String key, Object... args)
key
- the key of the messageargs
- the arguments to use as MessageFormat.format(mesg, args)public Locale getLocale()
public boolean containsKey(String key)
key
is contained in this ResourceBundle
or its parent
bundles.key
- the resource key
true
if the given key
is contained in this ResourceBundle
or its
parent bundles; false
otherwise.NullPointerException
- if key
is null
Copyright © 2018 Vitam. All rights reserved.