public class FlowableExpressionFormatUtils extends Object
| Constructor and Description |
|---|
FlowableExpressionFormatUtils() |
| Modifier and Type | Method and Description |
|---|---|
String |
formatCurrencyWithLocale(String currencyCode,
double amount,
String languageTag)
Formats a currency amount according to the format specified in the locale of the provided language tag.
|
String |
formatDate(Object dateObject,
String dateFormat)
Formats a Date or Instant to a String with the given Format
|
String |
formatDecimal(String pattern,
double decimal)
Formats a String according to the Java Formatter specification with a Decimal Formatter in the default locale.
|
String |
formatString(String text,
Object... substitutes)
Formats a String according to the Java Formatter specification, see https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html
or https://docs.oracle.com/javase/tutorial/java/data/numberformat.html
|
String |
formatStringWithLocale(String languageTag,
String text,
Object... substitutes)
Formats a String according to the Java Formatter specification, see https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html
or https://docs.oracle.com/javase/tutorial/java/data/numberformat.html.
|
public String formatString(String text, Object... substitutes)
text - String to be formattedsubstitutes - Objects to be replacedpublic String formatDate(Object dateObject, String dateFormat)
dateObject - Date or Instant to convertdateFormat - Date Format to be usedpublic String formatDecimal(String pattern, double decimal)
pattern - Decimal Pattern to be useddecimal - Decimal to be formattedpublic String formatStringWithLocale(String languageTag, String text, Object... substitutes)
languageTag - The language to be used when formatting, e.g. "de-CH"text - The text to be formattedsubstitutes - The substitutes in the order of their appearance.public String formatCurrencyWithLocale(String currencyCode, double amount, String languageTag)
currencyCode - The currency ot be formatted withlanguageTag - The language to be used when formatting, e.g. "de-CH".amount - The amount to be formattedCopyright © 2019. All rights reserved.