public class LocalStringsImpl extends Object
Specifics:
Note: You can not get an Exception out of calling this code! If the String or the properties file does not exist, it will return the String that you gave in the first place as the argument.
Example:
Constructor and Description |
---|
LocalStringsImpl()
Create a LocalStringsImpl instance.
|
LocalStringsImpl(Class clazz)
Create a LocalStringsImpl instance.
|
LocalStringsImpl(String packageName,
String propsName)
Create a LocalStringsImpl instance.
|
Modifier and Type | Method and Description |
---|---|
String |
get(String indexString)
Get a String from the caller's package's LocalStrings.properties
|
String |
get(String indexString,
Object... objects)
Get and format a String from the caller's package's LocalStrings.properties
|
boolean |
getBoolean(String indexString,
boolean defaultValue)
Get a boolean from the caller's package's LocalStrings.properties
|
int |
getInt(String indexString,
int defaultValue)
Get an integer from the caller's package's LocalStrings.properties
|
String |
getString(String indexString,
String defaultValue)
Get a String from the caller's package's LocalStrings.properties
|
public LocalStringsImpl()
public LocalStringsImpl(Class clazz)
public String get(String indexString)
indexString
- The string index into the localized string filepublic String get(String indexString, Object... objects)
indexString
- The string index into the localized string fileobjects
- The arguments to give to MessageFormatpublic String getString(String indexString, String defaultValue)
indexString
- The string index into the localized string filepublic int getInt(String indexString, int defaultValue)
indexString
- The string index into the localized string filepublic boolean getBoolean(String indexString, boolean defaultValue)
indexString
- The string index into the localized string fileCopyright © 2018. All rights reserved.