Methods Summary |
---|
public java.lang.String | formatCurrency(double number)
return formatterImpl.formatCurrency(number);
|
public java.lang.String | formatCurrency(double number, java.lang.String currencyCode)
if (currencyCode.length() != 3 ||
currencyCode.charAt(0) < 'A" || currencyCode.charAt(0) > 'Z" ||
currencyCode.charAt(1) < 'A" || currencyCode.charAt(1) > 'Z" ||
currencyCode.charAt(2) < 'A" || currencyCode.charAt(2) > 'Z") {
throw new IllegalArgumentException("Illegal currency code");
}
return formatterImpl.formatCurrency(number, currencyCode);
|
public java.lang.String | formatDateTime(java.util.Calendar dateTime, int style)
if (dateTime == null) {
throw new NullPointerException("Calendar is null.");
}
if (style < DATE_SHORT || style > DATETIME_LONG) {
throw new IllegalArgumentException("Illegal style value");
}
return formatterImpl.formatDateTime(dateTime, style);
|
public static java.lang.String | formatMessage(java.lang.String template, java.lang.String[] params)
if (template == null || params == null) {
throw new NullPointerException("Template or parameter array is null.");
}
return MessageFormat.format(template, params);
|
public java.lang.String | formatNumber(double number)
return formatterImpl.formatNumber(number);
|
public java.lang.String | formatNumber(double number, int decimals)
if (decimals < 1 || decimals > 15) {
throw new IllegalArgumentException("Illegal number of decimals");
}
return formatterImpl.formatNumber(number, decimals);
|
public java.lang.String | formatNumber(long number)
return formatterImpl.formatNumber(number);
|
public java.lang.String | formatPercentage(long number)
return formatterImpl.formatPercentage(number);
|
public java.lang.String | formatPercentage(float number, int decimals)
if (decimals < 1 || decimals > 15) {
throw new IllegalArgumentException("Illegal number of decimals");
}
return formatterImpl.formatPercentage(number, decimals);
|
public java.lang.String | getLocale()
return locale;
|
public static java.lang.String[] | getSupportedLocales()
return formatAbstractionLayer.getSupportedLocales();
|