Commit af65af64 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Javadoc work.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4081 b35dd754-fafc-0310-a699-88a17e54d16e
parent 81686395
......@@ -42,7 +42,7 @@ public class LocaleUtils {
// The basename to use for looking up the appropriate resource bundles
// TODO - extract this out into a test that grabs the resource name from JiveGlobals
// and defaults to wildfire_i18n if nothing set.
// TODO and defaults to wildfire_i18n if nothing set.
private static final String resourceBaseName = "wildfire_i18n";
private LocaleUtils() {
......@@ -474,7 +474,9 @@ public class LocaleUtils {
* inserted into the pattern at the appropriate places.
* @return the localized string.
*/
public static String getLocalizedString(String key, Locale locale, List arguments, ResourceBundle bundle) {
public static String getLocalizedString(String key, Locale locale, List arguments,
ResourceBundle bundle)
{
if (key == null) {
throw new NullPointerException("Key cannot be null");
}
......@@ -553,28 +555,46 @@ public class LocaleUtils {
}
/**
* Returns an internationalized String representation of the number using
* the default locale.
*
* @param number the number to format.
* @return an internationalized String representation of the number.
*/
public static String getLocalizedNumber(long number) {
return NumberFormat.getInstance().format(number);
}
/**
* Returns an internationalized String representation of the number using
* the specified locale.
*
* @param number the number to format.
* @param locale the locale to use for formatting.
* @return an internationalized String representation of the number.
*/
public static String getLocalizedNumber(long number, Locale locale) {
return NumberFormat.getInstance(locale).format(number);
}
/**
* Returns an internationalized String representation of the number using
* the default locale.
*
* @param number the number to format.
* @return an internationalized String representation of the number.
*/
public static String getLocalizedNumber(double number) {
return NumberFormat.getInstance().format(number);
}
/**
* Returns an internationalized String representation of the number using
* the specified locale.
*
* @param number the number to format.
* @param locale the locale to use for formatting.
* @return an internationalized String representation of the number.
*/
public static String getLocalizedNumber(double number, Locale locale) {
return NumberFormat.getInstance(locale).format(number);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment