public class LocalStrings 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.
Examples:
Modifier and Type | Method and Description |
---|---|
static String |
get(String indexString)
Get a String from the caller's package's LocalStrings.properties
|
static 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
|
static 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 static String get(String indexString)
indexString
- The string index into the localized string filepublic static 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 static 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.