public class RMLString
extends java.lang.Object
Locale.getDefault()
value.Constructor and Description |
---|
RMLString() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
format(java.lang.String key,
java.lang.Object... args)
Uses
java.text.MessageFormat to generate a formatted
String based upon the localized pattern String defined by the key
parameter. |
static java.lang.String |
format(java.lang.String key,
java.lang.String defaultPattern,
java.lang.Object... args)
Uses
java.text.MessageFormat to generate a formatted
String based upon the localized pattern String defined by the key
parameter. |
static java.lang.String |
get(java.lang.String key)
Retrieves the localized string defined by the
key
parameter using the Locale.getDefault() value. |
static java.lang.String |
get(java.lang.String key,
java.lang.String defaultValue)
Retrieves the localized string defined by the
key
parameter using the Locale.getDefault() value. |
public static java.lang.String get(java.lang.String key)
key
parameter using the Locale.getDefault()
value.key
- String
key for use with .properties file.String
if available.
Returns null
if no such String
resource is available.public static java.lang.String get(java.lang.String key, java.lang.String defaultValue)
key
parameter using the Locale.getDefault()
value.
Returns given defaultValue
String
parameter value
if no resource String
is available.key
- String
key for use with .properties file.defaultValue
- Fall back String
value to return if no resource String
is available.
This entry can be null
.String
if available.
Returns defaultValue
if no such String
resource is available.public static java.lang.String format(java.lang.String key, java.lang.Object... args)
java.text.MessageFormat
to generate a formatted
String
based upon the localized pattern String
defined by the key
parameter.key
- String
key for use with .properties file.args
- Variable # of Object
arguments to be formated and substituted.String
.public static java.lang.String format(java.lang.String key, java.lang.String defaultPattern, java.lang.Object... args)
java.text.MessageFormat
to generate a formatted
String
based upon the localized pattern String
defined by the key
parameter. If no such pattern is available, the defaultPattern
parameter is used instead.key
- String
key for use with .properties file.defaultPattern
- Fallback pattern String
.args
- Variable # of Object arguments to be formated and substituted.String
.© Copyright IBM Corp. 2010, 2013. All Rights Reserved.