A collection of pipes used to transform basic values including: strings transformation, date formatting, number formatting, escaping...
- Since:
- 1.2
- Author:
- Jeremy Kuhn
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncurrency()
Returns a pipe which formats a number as an amount in the default locale currency.currency
(int minIntegerDigits, int minFractionDigits, int maxFractionDigits) Returns a pipe which formats a number as an amount in the default locale currency according to the specified limits.Returns a pipe which formats a number as an amount in the specified locale currency according to the specified limits.Returns a pipe which formats a number as an amount in the specified currency using default locale format.Returns a pipe which formats a number as an amount in the specified currency using default locale format according to the specified limits.currency
(String currencyCode, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, Locale locale) Returns a pipe which formats a number as an amount in the specified currency using the specified locale format according to the specified limits.Returns a pipe which formats a number as an amount in the specified currency using specified locale format.Returns a pipe which formats a number as an amount in the specified currency using default locale format.Returns a pipe which formats a number as an amount in the specified currency using default locale format according to the specified limits.currency
(Currency currency, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, Locale locale) Returns a pipe which formats a number as an amount in the specified currency using the specified locale format according to the specified limits.Returns a pipe which formats a number as an amount in the specified currency using the specified locale format.Returns a pipe which formats a number as an amount in the specified locale currency.static Pipe
<TemporalAccessor, String> date
(FormatStyle dateStyle) Returns a pipe which formats a temporal object (date, time, date-time...) as a date using the specified format style.static Pipe
<TemporalAccessor, String> date
(FormatStyle dateStyle, Locale locale) Returns a pipe which formats a temporal object (date, time, date-time...) as a date using the specified format style and locale.static Pipe
<TemporalAccessor, String> Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified pattern.static Pipe
<TemporalAccessor, String> Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified pattern and zone.static Pipe
<TemporalAccessor, String> Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified pattern, zone and locale.static Pipe
<TemporalAccessor, String> Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified pattern and locale.static Pipe
<TemporalAccessor, String> dateTime
(DateTimeFormatter formatter) Returns a pipe which formats a temporal object (date, time, date-time...) using the specified formatter.static Pipe
<TemporalAccessor, String> dateTime
(FormatStyle dateTimeStyle) Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified format style.static Pipe
<TemporalAccessor, String> dateTime
(FormatStyle dateTimeStyle, ZoneId zone) Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified format style and zone.static Pipe
<TemporalAccessor, String> dateTime
(FormatStyle dateTimeStyle, ZoneId zone, Locale locale) Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified format style, zone and locale.static Pipe
<TemporalAccessor, String> dateTime
(FormatStyle dateTimeStyle, Locale locale) Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified format style and locale.Returns a pipe which escapes a string using HTML entities.Returns a pipe which escapes a string using Json string rules rules.Returns a pipe which escapes a string using XML entities.integer()
Returns a pipe which formats a number as an integer.Returns a pipe which formats a number as an integer for the specified locale.Returns a pipe which converts all characters in a string to lower case.number()
Returns a pipe which formats a number using the default format.number
(int minIntegerDigits, int minFractionDigits, int maxFractionDigits) Returns a pipe which formats a number according to the specified limits.Returns a pipe which formats a number for the specified locale according to the specified limits.number
(NumberFormat formatter) Returns a pipe which formats a number using the specified format.Returns a pipe which formats a number using the format for the specified locale.percent()
Returns a pipe which formats a number as a percentage using default locale format.percent
(int minIntegerDigits, int minFractionDigits, int maxFractionDigits) Returns a pipe which formats a number as a percentage using default locale format according to the specified limits.Returns a pipe which formats a number as a percentage using the specified locale format according to the specified limits.Returns a pipe which formats a number as a percentage using the specified locale format.Returns a pipe which changes the first character in a string to title case.Returns a pipe which converts all characters in a string to upper case.
-
Constructor Details
-
Pipes
public Pipes()
-
-
Method Details
-
uppercase
Returns a pipe which converts all characters in a string to upper case.
- Returns:
- a pipe
-
lowercase
Returns a pipe which converts all characters in a string to lower case.
- Returns:
- a pipe
-
titlecase
Returns a pipe which changes the first character in a string to title case.
- Returns:
- a pipe
-
dateTime
Returns a pipe which formats a temporal object (date, time, date-time...) using the specified formatter.
- Parameters:
formatter
- a date time formatter- Returns:
- a pipe
-
date
Returns a pipe which formats a temporal object (date, time, date-time...) as a date using the specified format style.
- Parameters:
dateStyle
- a date format style- Returns:
- a pipe
-
date
Returns a pipe which formats a temporal object (date, time, date-time...) as a date using the specified format style and locale.
- Parameters:
dateStyle
- a date format stylelocale
- a locale- Returns:
- a pipe
-
dateTime
Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified format style.
- Parameters:
dateTimeStyle
- a date-time format style- Returns:
- a pipe
-
dateTime
Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified format style and zone.
- Parameters:
dateTimeStyle
- a date-time format stylezone
- a zone- Returns:
- a pipe
-
dateTime
Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified format style and locale.
- Parameters:
dateTimeStyle
- a date-time format stylelocale
- a locale- Returns:
- a pipe
-
dateTime
public static Pipe<TemporalAccessor,String> dateTime(FormatStyle dateTimeStyle, ZoneId zone, Locale locale) Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified format style, zone and locale.
- Parameters:
dateTimeStyle
- a date-time format stylezone
- a zonelocale
- a locale- Returns:
- a pipe
-
dateTime
Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified pattern.
- Parameters:
pattern
- a date-time pattern- Returns:
- a pipe
-
dateTime
Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified pattern and zone.
- Parameters:
pattern
- a date-time patternzone
- a zone- Returns:
- a pipe
-
dateTime
Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified pattern and locale.
- Parameters:
pattern
- a date-time patternlocale
- a locale- Returns:
- a pipe
-
dateTime
Returns a pipe which formats a temporal object (date, time, date-time...) as a date-time using the specified pattern, zone and locale.
- Parameters:
pattern
- a date-time patternzone
- a zonelocale
- a locale- Returns:
- a pipe
-
number
Returns a pipe which formats a number using the specified format.
- Parameters:
formatter
- a number format- Returns:
- a pipe
-
number
Returns a pipe which formats a number using the default format.
- Returns:
- a pipe
-
number
Returns a pipe which formats a number using the format for the specified locale.
- Parameters:
locale
- a locale- Returns:
- a pipe
-
number
public static Pipe<Number,String> number(int minIntegerDigits, int minFractionDigits, int maxFractionDigits) Returns a pipe which formats a number according to the specified limits.
- Parameters:
minIntegerDigits
- the minimum number of digits allowed in the integer portionminFractionDigits
- the minimum number of digits allowed in the fraction portionmaxFractionDigits
- the maximum number of digits allowed in the fraction portion- Returns:
- a pipe
-
number
public static Pipe<Number,String> number(int minIntegerDigits, int minFractionDigits, int maxFractionDigits, Locale locale) Returns a pipe which formats a number for the specified locale according to the specified limits.
- Parameters:
minIntegerDigits
- the minimum number of digits allowed in the integer portionminFractionDigits
- the minimum number of digits allowed in the fraction portionmaxFractionDigits
- the maximum number of digits allowed in the fraction portionlocale
- a locale- Returns:
- a pipe
-
integer
Returns a pipe which formats a number as an integer.
- Returns:
- a pipe
-
integer
Returns a pipe which formats a number as an integer for the specified locale.
- Parameters:
locale
- a locale- Returns:
- a pipe
-
currency
Returns a pipe which formats a number as an amount in the default locale currency.
- Returns:
- a pipe
-
currency
Returns a pipe which formats a number as an amount in the specified locale currency.
- Parameters:
locale
- a locale- Returns:
- a pipe
-
currency
public static Pipe<Number,String> currency(int minIntegerDigits, int minFractionDigits, int maxFractionDigits) Returns a pipe which formats a number as an amount in the default locale currency according to the specified limits.
- Parameters:
minIntegerDigits
- the minimum number of digits allowed in the integer portionminFractionDigits
- the minimum number of digits allowed in the fraction portionmaxFractionDigits
- the maximum number of digits allowed in the fraction portion- Returns:
- a pipe
-
currency
public static Pipe<Number,String> currency(int minIntegerDigits, int minFractionDigits, int maxFractionDigits, Locale locale) Returns a pipe which formats a number as an amount in the specified locale currency according to the specified limits.
- Parameters:
minIntegerDigits
- the minimum number of digits allowed in the integer portionminFractionDigits
- the minimum number of digits allowed in the fraction portionmaxFractionDigits
- the maximum number of digits allowed in the fraction portionlocale
- a locale- Returns:
- a pipe
-
currency
Returns a pipe which formats a number as an amount in the specified currency using default locale format.
- Parameters:
currencyCode
- a currency code- Returns:
- a pipe
-
currency
public static Pipe<Number,String> currency(String currencyCode, int minIntegerDigits, int minFractionDigits, int maxFractionDigits) Returns a pipe which formats a number as an amount in the specified currency using default locale format according to the specified limits.
- Parameters:
currencyCode
- a currency codeminIntegerDigits
- the minimum number of digits allowed in the integer portionminFractionDigits
- the minimum number of digits allowed in the fraction portionmaxFractionDigits
- the maximum number of digits allowed in the fraction portion- Returns:
- a pipe
-
currency
Returns a pipe which formats a number as an amount in the specified currency using specified locale format.
- Parameters:
currencyCode
- a currency codelocale
- a locale- Returns:
- a pipe
-
currency
public static Pipe<Number,String> currency(String currencyCode, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, Locale locale) Returns a pipe which formats a number as an amount in the specified currency using the specified locale format according to the specified limits.
- Parameters:
currencyCode
- a currency codeminIntegerDigits
- the minimum number of digits allowed in the integer portionminFractionDigits
- the minimum number of digits allowed in the fraction portionmaxFractionDigits
- the maximum number of digits allowed in the fraction portionlocale
- a locale- Returns:
- a pipe
-
currency
Returns a pipe which formats a number as an amount in the specified currency using default locale format.
- Parameters:
currency
- a currency- Returns:
- a pipe
-
currency
public static Pipe<Number,String> currency(Currency currency, int minIntegerDigits, int minFractionDigits, int maxFractionDigits) Returns a pipe which formats a number as an amount in the specified currency using default locale format according to the specified limits.
- Parameters:
currency
- a currencyminIntegerDigits
- the minimum number of digits allowed in the integer portionminFractionDigits
- the minimum number of digits allowed in the fraction portionmaxFractionDigits
- the maximum number of digits allowed in the fraction portion- Returns:
- a pipe
-
currency
Returns a pipe which formats a number as an amount in the specified currency using the specified locale format.
- Parameters:
currency
- a currencylocale
- a locale- Returns:
- a pipe
-
currency
public static Pipe<Number,String> currency(Currency currency, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, Locale locale) Returns a pipe which formats a number as an amount in the specified currency using the specified locale format according to the specified limits.
- Parameters:
currency
- a currencyminIntegerDigits
- the minimum number of digits allowed in the integer portionminFractionDigits
- the minimum number of digits allowed in the fraction portionmaxFractionDigits
- the maximum number of digits allowed in the fraction portionlocale
- a locale- Returns:
- a pipe
-
percent
Returns a pipe which formats a number as a percentage using default locale format.
- Returns:
- a pipe
-
percent
Returns a pipe which formats a number as a percentage using the specified locale format.
- Parameters:
locale
- a locale- Returns:
- a pipe
-
percent
public static Pipe<Number,String> percent(int minIntegerDigits, int minFractionDigits, int maxFractionDigits) Returns a pipe which formats a number as a percentage using default locale format according to the specified limits.
- Parameters:
minIntegerDigits
- the minimum number of digits allowed in the integer portionminFractionDigits
- the minimum number of digits allowed in the fraction portionmaxFractionDigits
- the maximum number of digits allowed in the fraction portion- Returns:
- a pipe
-
percent
public static Pipe<Number,String> percent(int minIntegerDigits, int minFractionDigits, int maxFractionDigits, Locale locale) Returns a pipe which formats a number as a percentage using the specified locale format according to the specified limits.
- Parameters:
minIntegerDigits
- the minimum number of digits allowed in the integer portionminFractionDigits
- the minimum number of digits allowed in the fraction portionmaxFractionDigits
- the maximum number of digits allowed in the fraction portionlocale
- a locale- Returns:
- a pipe
-
escapeHtml
Returns a pipe which escapes a string using HTML entities.
- Returns:
- a pipe
-
escapeJson
Returns a pipe which escapes a string using Json string rules rules.
- Returns:
- a pipe
-
escapeXml
Returns a pipe which escapes a string using XML entities.
- Returns:
- a pipe
-