Functions: FnBigDecimal

1. Overview

FnBigDecimal is a function hub class containing a lot of static methods to work with BigDecimal objects. Those static methods return functions that take an BigDecimal object either as its input or output (depending on the function). It includes conversions to String, to an String representing a currency and logical operations between BigDecimal objects among others.

2. Functions

Function nameTypeParamsDescription
absFunction<BigDecimal, BigDecimal>

It returns the absolute value of the input

addFunction<BigDecimal, BigDecimal>Number add

It adds the given number to the target and returns the result

addFunction<BigDecimal, BigDecimal>byte add

It adds the given number to the target and returns the result

addFunction<BigDecimal, BigDecimal>short add

It adds the given number to the target and returns the result

addFunction<BigDecimal, BigDecimal>int add

It adds the given number to the target and returns the result

addFunction<BigDecimal, BigDecimal>long add

It adds the given number to the target and returns the result

addFunction<BigDecimal, BigDecimal>float add

It adds the given number to the target and returns the result

addFunction<BigDecimal, BigDecimal>double add

It adds the given number to the target and returns the result

avgFunction<Iterable<BigDecimal>, BigDecimal>

It returns the average of all the numbers in the Iterable input object

avgFunction<Iterable<BigDecimal>, BigDecimal>MathContext mathContext

It returns the average of all the numbers in the Iterable input object. The given MathContext will be used to round and set the output precision

avgFunction<Iterable<BigDecimal>, BigDecimal>RoundingMode roundingMode

It returns the average of all the numbers in the Iterable input object. The given RoundingMode will be used to round the output

avgArrayFunction<BigDecimal[], BigDecimal>

It returns the average of all the numbers in the input array

avgArrayFunction<BigDecimal[], BigDecimal>MathContext mathContext

It returns the average of all the numbers in the input array. The given MathContext will be used to round and set the output precision

avgArrayFunction<BigDecimal[], BigDecimal>RoundingMode roundingMode

It returns the average of all the numbers in the input array. The given RoundingMode will be used to round the output

betweenFunction<BigDecimal,Boolean>Number min
Number max

Determines whether the target object is between min and max in value, this is, whether target.compareTo(min) >= 0 && target.compareTo(max) <= 0. The target and the specified min and max have to implement Comparable.

divideByFunction<BigDecimal, BigDecimal>Number divisor

It divides the target element by the given divisor and returns its result

divideByFunction<BigDecimal, BigDecimal>byte divisor

It divides the target element by the given divisor and returns its result

divideByFunction<BigDecimal, BigDecimal>short divisor

It divides the target element by the given divisor and returns its result

divideByFunction<BigDecimal, BigDecimal>int divisor

It divides the target element by the given divisor and returns its result

divideByFunction<BigDecimal, BigDecimal>long divisor

It divides the target element by the given divisor and returns its result

divideByFunction<BigDecimal, BigDecimal>float divisor

It divides the target element by the given divisor and returns its result

divideByFunction<BigDecimal, BigDecimal>double divisor

It divides the target element by the given divisor and returns its result

divideByFunction<BigDecimal, BigDecimal>Number divisor
MathContext mathContext

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

divideByFunction<BigDecimal, BigDecimal>byte divisor
MathContext mathContext

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

divideByFunction<BigDecimal, BigDecimal>short divisor
MathContext mathContext

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

divideByFunction<BigDecimal, BigDecimal>int divisor
MathContext mathContext

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

divideByFunction<BigDecimal, BigDecimal>long divisor
MathContext mathContext

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

divideByFunction<BigDecimal, BigDecimal>float divisor
MathContext mathContext

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

divideByFunction<BigDecimal, BigDecimal>double divisor
MathContext mathContext

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

divideByFunction<BigDecimal, BigDecimal>Number divisor
RoundingMode roundingMode

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

divideByFunction<BigDecimal, BigDecimal>byte divisor
RoundingMode roundingMode

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

divideByFunction<BigDecimal, BigDecimal>short divisor
RoundingMode roundingMode

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

divideByFunction<BigDecimal, BigDecimal>int divisor
RoundingMode roundingMode

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

divideByFunction<BigDecimal, BigDecimal>long divisor
RoundingMode roundingMode

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

divideByFunction<BigDecimal, BigDecimal>float divisor
RoundingMode roundingMode

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

divideByFunction<BigDecimal, BigDecimal>double divisor
RoundingMode roundingMode

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

eqFunction<BigDecimal,Boolean>BigDecimal object

Determines whether the target object and the specified object are equal by calling the equals method on the target object.

eqByFunction<BigDecimal,Boolean>IFunction<BigDecimal,?> by
Object object

Determines whether the result of executing the specified function on the target object and the specified object parameter are equal by calling the equals method.

eqValueFunction<BigDecimal,Boolean>BigDecimal object

Determines whether the target object and the specified object are equal in value, this is, whether target.compareTo(object) == 0. Both the target and the specified object have to implement Comparable.

eqValueByFunction<BigDecimal,Boolean>IFunction<BigDecimal,?> by
Object object

Determines whether the result of executing the specified function on the target object and the specified object parameter are equal in value, this is, whether functionResult.compareTo(object) == 0. Both the function result and the specified object have to implement Comparable.

greaterOrEqToFunction<BigDecimal,Boolean>Number object

Determines whether the target object is greater or equal to the specified object in value, this is, whether target.compareTo(object) >= 0. Both the target and the specified object have to implement Comparable.

greaterOrEqToByFunction<BigDecimal,Boolean>IFunction<BigDecimal,?> by
Object object

Determines whether the result of executing the specified function on the target object is greater or equal to the specified object parameter in value, this is, whether functionResult.compareTo(object) >= 0. Both the target and the specified object have to implement Comparable.

greaterThanFunction<BigDecimal,Boolean>Number object

Determines whether the target object is greater than the specified object in value, this is, whether target.compareTo(object) > 0. Both the target and the specified object have to implement Comparable.

greaterThanByFunction<BigDecimal,Boolean>IFunction<BigDecimal,?> by
Object object

Determines whether the result of executing the specified function on the target object is greater than the specified object parameter in value, this is, whether functionResult.compareTo(object) > 0. Both the target and the specified object have to implement Comparable.

isNotNullFunction<BigDecimal,Boolean>

Determines whether the target object is null or not.

isNullFunction<BigDecimal,Boolean>

Determines whether the target object is null or not.

lessOrEqToFunction<BigDecimal,Boolean>Number object

Determines whether the target object is less or equal to the specified object in value, this is, whether target.compareTo(object) <= 0. Both the target and the specified object have to implement Comparable.

lessOrEqToByFunction<BigDecimal,Boolean>IFunction<BigDecimal,?> by
Object object

Determines whether the result of executing the specified function on the target object is less or equal to the specified object parameter in value, this is, whether functionResult.compareTo(object) <= 0. Both the target and the specified object have to implement Comparable.

lessThanFunction<BigDecimal,Boolean>Number object

Determines whether the target object is less than the specified object in value, this is, whether target.compareTo(object) < 0. Both the target and the specified object have to implement Comparable.

lessThanByFunction<BigDecimal,Boolean>IFunction<BigDecimal,?> by
Object object

Determines whether the result of executing the specified function on the target object is less than the specified object parameter in value, this is, whether functionResult.compareTo(object) < 0. Both the target and the specified object have to implement Comparable.

maxFunction<Iterable<BigDecimal>, BigDecimal>

It returns the maximum number from an Iterable input object

maxArrayFunction<BigDecimal[], BigDecimal>

It returns the maximum number from the input array

minFunction<Iterable<BigDecimal>, BigDecimal>

It returns the minimum number from an Iterable input object

minArrayFunction<BigDecimal[], BigDecimal>

It returns the minimum number from the input array

multiplyByFunction<BigDecimal, BigDecimal>Number multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<BigDecimal, BigDecimal>byte multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<BigDecimal, BigDecimal>short multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<BigDecimal, BigDecimal>int multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<BigDecimal, BigDecimal>long multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<BigDecimal, BigDecimal>float multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<BigDecimal, BigDecimal>double multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<BigDecimal, BigDecimal>Number multiplicand
MathContext mathContext

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

multiplyByFunction<BigDecimal, BigDecimal>byte multiplicand
MathContext mathContext

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

multiplyByFunction<BigDecimal, BigDecimal>short multiplicand
MathContext mathContext

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

multiplyByFunction<BigDecimal, BigDecimal>int multiplicand
MathContext mathContext

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

multiplyByFunction<BigDecimal, BigDecimal>long multiplicand
MathContext mathContext

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

multiplyByFunction<BigDecimal, BigDecimal>float multiplicand
MathContext mathContext

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

multiplyByFunction<BigDecimal, BigDecimal>double multiplicand
MathContext mathContext

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

multiplyByFunction<BigDecimal, BigDecimal>Number multiplicand
RoundingMode roundingMode

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

multiplyByFunction<BigDecimal, BigDecimal>byte multiplicand
RoundingMode roundingMode

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

multiplyByFunction<BigDecimal, BigDecimal>short multiplicand
RoundingMode roundingMode

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

multiplyByFunction<BigDecimal, BigDecimal>int multiplicand
RoundingMode roundingMode

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

multiplyByFunction<BigDecimal, BigDecimal>long multiplicand
RoundingMode roundingMode

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

multiplyByFunction<BigDecimal, BigDecimal>float multiplicand
RoundingMode roundingMode

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

multiplyByFunction<BigDecimal, BigDecimal>double multiplicand
RoundingMode roundingMode

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

notEqFunction<BigDecimal,Boolean>BigDecimal object

Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object.

notEqByFunction<BigDecimal,Boolean>IFunction<BigDecimal,?> by
Object object

Determines whether the result of executing the specified function on the target object and the specified object parameter are NOT equal by calling the equals method.

notEqValueFunction<BigDecimal,Boolean>BigDecimal object

Determines whether the target object and the specified object are NOT equal in value, this is, whether target.compareTo(object) != 0. Both the target and the specified object have to implement Comparable.

notEqValueByFunction<BigDecimal,Boolean>IFunction<BigDecimal,?> by
Object object

Determines whether the result of executing the specified function on the target object and the specified object parameter are NOT equal in value, this is, whether functionResult.compareTo(object) != 0. Both the function result and the specified object have to implement Comparable.

powFunction<BigDecimal, BigDecimal>int power

It performs the operation targetpower and returns its value

powFunction<BigDecimal, BigDecimal>int power
MathContext mathContext

It performs the operation targetpower and returns its value. The result precision and rounding mode is specified by the given MathContext

powFunction<BigDecimal, BigDecimal>int power
RoundingMode roundingMode

It performs the operation targetpower and returns its value. The result rounding mode is specified by the given RoundingMode

remainderFunction<BigDecimal, BigDecimal>Number divisor

It divides the target element by the given divisor and returns the remainder (target % divisor)

remainderFunction<BigDecimal, BigDecimal>byte divisor

It divides the target element by the given divisor and returns the remainder (target % divisor)

remainderFunction<BigDecimal, BigDecimal>short divisor

It divides the target element by the given divisor and returns the remainder (target % divisor)

remainderFunction<BigDecimal, BigDecimal>int divisor

It divides the target element by the given divisor and returns the remainder (target % divisor)

remainderFunction<BigDecimal, BigDecimal>long divisor

It divides the target element by the given divisor and returns the remainder (target % divisor)

remainderFunction<BigDecimal, BigDecimal>float divisor

It divides the target element by the given divisor and returns the remainder (target % divisor)

remainderFunction<BigDecimal, BigDecimal>double divisor

It divides the target element by the given divisor and returns the remainder (target % divisor)

remainderFunction<BigDecimal, BigDecimal>Number divisor
MathContext mathContext

It divides the target element by the given divisor and returns the remainder (target % divisor). The remainder precision and RoundingMode is specified by the given MathContext

remainderFunction<BigDecimal, BigDecimal>byte divisor
MathContext mathContext

It divides the target element by the given divisor and returns the remainder (target % divisor). The remainder precision and RoundingMode is specified by the given MathContext

remainderFunction<BigDecimal, BigDecimal>short divisor
MathContext mathContext

It divides the target element by the given divisor and returns the remainder (target % divisor). The remainder precision and RoundingMode is specified by the given MathContext

remainderFunction<BigDecimal, BigDecimal>int divisor
MathContext mathContext

It divides the target element by the given divisor and returns the remainder (target % divisor). The remainder precision and RoundingMode is specified by the given MathContext

remainderFunction<BigDecimal, BigDecimal>long divisor
MathContext mathContext

It divides the target element by the given divisor and returns the remainder (target % divisor). The remainder precision and RoundingMode is specified by the given MathContext

remainderFunction<BigDecimal, BigDecimal>float divisor
MathContext mathContext

It divides the target element by the given divisor and returns the remainder (target % divisor). The remainder precision and RoundingMode is specified by the given MathContext

remainderFunction<BigDecimal, BigDecimal>double divisor
MathContext mathContext

It divides the target element by the given divisor and returns the remainder (target % divisor). The remainder precision and RoundingMode is specified by the given MathContext

roundFunction<BigDecimal, BigDecimal>MathContext mathContext

It rounds the input number with the given MathContext

roundFunction<BigDecimal, BigDecimal>RoundingMode roundingMode

It rounds the input number with the given RoundingMode

roundBigDecimalFunction<BigDecimal,BigDecimal>int scale
RoundingMode roundingMode

It rounds the input number with the given scale and RoundingMode. The input number will be converted into a BigDecimal with the given scale and roundingMode

subtractFunction<BigDecimal, BigDecimal>Number subtract

It subtracts the given number from the target and returns the result

subtractFunction<BigDecimal, BigDecimal>byte subtract

It subtracts the given number from the target and returns the result

subtractFunction<BigDecimal, BigDecimal>short subtract

It subtracts the given number from the target and returns the result

subtractFunction<BigDecimal, BigDecimal>int subtract

It subtracts the given number from the target and returns the result

subtractFunction<BigDecimal, BigDecimal>long subtract

It subtracts the given number from the target and returns the result

subtractFunction<BigDecimal, BigDecimal>float subtract

It subtracts the given number from the target and returns the result

subtractFunction<BigDecimal, BigDecimal>double subtract

It subtracts the given number from the target and returns the result

sumFunction<Iterable<BigDecimal>, BigDecimal>

It returns the sum of all the numbers in the Iterable input object

sumArrayFunction<BigDecimal[], BigDecimal>

It returns the sum of all the numbers in the input array

toCurrencyStrFunction<BigDecimal,String>

It returns the String representation of the target as a currency in the default Locale

toCurrencyStrFunction<BigDecimal,String>boolean groupingUsed

It returns the String representation of the target as a currency in the default Locale

toCurrencyStrFunction<BigDecimal,String>Locale locale

It returns the String representation of the target as a currency in the given Locale

toCurrencyStrFunction<BigDecimal,String>String locale

It returns the String representation of the target as a currency in the given locale

toCurrencyStrFunction<BigDecimal,String>Locale locale
boolean groupingUsed

It returns the String representation of the target as a currency in the given Locale

toCurrencyStrFunction<BigDecimal,String>String locale
boolean groupingUsed

It returns the String representation of the target as a currency in the given locale

toCurrencyStrFunction<BigDecimal,String>Locale locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed

It returns the String representation of the target as a currency in the given Locale. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toCurrencyStr(Locale.UK, 3, 2, 2, true) would return 1,000.00 if target number is 1000
toCurrencyStr(Locale.UK, 2, 2, 4, true) would return 00.00 if target number is 0
toCurrencyStrFunction<BigDecimal,String>String locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed

It returns the String representation of the target as a currency in the given locale taking into account the given parameters. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toCurrencyStr(Locale.UK.toString(), 3, 2, 2, true) would return 1,000.00 if target number is 1000
toCurrencyStr(Locale.UK.toString(), 2, 2, 4, true) would return 00.00 if target number is 0
toCurrencyStrFunction<BigDecimal,String>Locale locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
char groupingSeparator
char decimalSeparator
boolean decimalSeparatorAlwaysShown

It returns the String representation of the target as a currency in the given Locale taking into account the given parameters. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toCurrencyStr(Locale.UK, 3, 2, 2, ',', ',', true) would return 1,000,00 if target number is 1000
toCurrencyStr(Locale.UK, 2, 2, 4, ',', ',', true) would return 00,00 if target number is 0
toCurrencyStrFunction<BigDecimal,String>Locale locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed
char decimalSeparator
boolean decimalSeparatorAlwaysShown

It returns the String representation of the target as a currency in the given Locale taking into account the given parameters. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toCurrencyStr(Locale.UK.toString(), 3, 2, 2, ',', ',', true) would return 1,000,00 if target number is 1000
toCurrencyStr(Locale.UK.toString(), 2, 2, 4, ',', ',', true) would return 00,00 if target number is 0
toCurrencyStrFunction<BigDecimal,String>String locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
char groupingSeparator
char decimalSeparator
boolean decimalSeparatorAlwaysShown

It returns the String representation of the target as a currency in the given locale taking into account the given parameters. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toCurrencyStr(Locale.UK, 3, 2, 2, ',', ',', true) would return 1,000,00 if target number is 1000
toCurrencyStr(Locale.UK, 2, 2, 4, ',', ',', true) would return 00,00 if target number is 0
toCurrencyStrFunction<BigDecimal,String>String locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed
char decimalSeparator
boolean decimalSeparatorAlwaysShown

It returns the String representation of the target as a currency in the given locale taking into account the given parameters. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toCurrencyStr(Locale.UK.toString(), 3, 2, 2, ',', ',', true) would return 1,000,00 if target number is 1000
toCurrencyStr(Locale.UK.toString(), 2, 2, 4, ',', ',', true) would return 00,00 if target number is 0
toPercentStrFunction<BigDecimal,String>

A String representing a percentage is created from the target number.

toPercentStrFunction<BigDecimal,String>boolean groupingUsed

A String representing a percentage is created from the target number either using grouping or not depending on the given parameter. So,

toPercentStr(true) would return 100,000% if target number is 1000
toPercentStr(false) would return 100000% if target number is 1000
toPercentStrFunction<BigDecimal,String>Locale locale

A String representing a percentage is created from the target number in the given Locale

toPercentStrFunction<BigDecimal,String>String locale

A String representing a percentage is created from the target number in the given locale

toPercentStrFunction<BigDecimal,String>Locale locale
boolean groupingUsed

A String representing a percentage is created from the target number in the given Locale. Grouping will be used depending on the value of the groupingUsed parameter.

toPercentStrFunction<BigDecimal,String>String locale
boolean groupingUsed

A String representing a percentage is created from the target number in the given locale. Grouping will be used depending on the value of the groupingUsed parameter.

toPercentStrFunction<BigDecimal,String>Locale locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed

A String representing a percentage is created from the target number in the given Locale. If necessary, it will add leading or trailing zeros to the string based on the given parameters.

toPercentStrFunction<BigDecimal,String>String locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed

A String representing a percentage is created from the target number in the given locale. If necessary, it will add leading or trailing zeros to the string based on the given parameters.

toPercentStrFunction<BigDecimal,String>Locale locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
char groupingSeparator
char decimalSeparator
boolean decimalSeparatorAlwaysShown

A String representing a percentage is created from the target number in the given Locale and using the other given parameters as well. If necessary, it will add leading or trailing zeros to the string based on the given parameters.

toPercentStrFunction<BigDecimal,String>Locale locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed
char decimalSeparator
boolean decimalSeparatorAlwaysShown

A String representing a percentage is created from the target number in the given locale and using the other given parameters as well. If necessary, it will add leading or trailing zeros to the string based on the given parameters.

toPercentStrFunction<BigDecimal,String>String locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
char groupingSeparator
char decimalSeparator
boolean decimalSeparatorAlwaysShown

A String representing a percentage is created from the target number in the given locale and using the other given parameters as well. If necessary, it will add leading or trailing zeros to the string based on the given parameters.

toPercentStrFunction<BigDecimal,String>String locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed
char decimalSeparator
boolean decimalSeparatorAlwaysShown

A String representing a percentage is created from the target number in the given locale and using the other given parameters as well. If necessary, it will add leading or trailing zeros to the string based on the given parameters.

toStrFunction<BigDecimal,String>

It returns the String representation of the input number

toStrFunction<BigDecimal,String>boolean groupingUsed

It returns the String representation of the input number either using or not using grouping

toStrFunction<BigDecimal,String>Locale locale

It returns the String representation of the target number in the given Locale

toStrFunction<BigDecimal,String>String locale

It returns the String representation of the target number in the given locale

toStrFunction<BigDecimal,String>Locale locale
boolean groupingUsed

It returns the String representation of the target number in the given Locale. Grouping will be used depending on the value of the groupingUsed parameter

toStrFunction<BigDecimal,String>String locale
boolean groupingUsed

It returns the String representation of the target number in the given locale. Grouping will be used depending on the value of the groupingUsed parameter

toStrFunction<BigDecimal,String>Locale locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed

It returns the String representation of the target number in the given Locale. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toStr(Locale.ENGLISH, 3, 2, 2, true) would return 010.00 if target number is 10
toStr(Locale.ENGLISH, 2, 2, 4, true) would return 00.00 if target number is 0
toStrFunction<BigDecimal,String>String locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed

It returns the String representation of the target number in the given locale. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toStr(Locale.ENGLISH.toString(), 3, 2, 2, true) would return 010.00 if target number is 10
toStr(Locale.ENGLISH.toString(), 2, 2, 4, true) would return 00.00 if target number is 0
toStrFunction<BigDecimal,String>Locale locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
char groupingSeparator
char decimalSeparator
boolean decimalSeparatorAlwaysShown

It returns the String representation of the target number in the given Locale. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toStr(Locale.ENGLISH, 3, 2, 2, ',', '.', true) would return 1,000.00 if target number is 1000
toStr(Locale.ENGLISH, 2, 2, 4, ',', '.', true) would return 00.00 if target number is 0
toStrFunction<BigDecimal,String>Locale locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed
char decimalSeparator
boolean decimalSeparatorAlwaysShown

It returns the String representation of the target number in the given Locale. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toStr(Locale.ENGLISH, 3, 2, 2, true, ',', true) would return 1,000,00 if target number is 1000
toStr(Locale.ENGLISH, 2, 2, 4, true, ',', true) would return 00,00 if target number is 0
toStrFunction<BigDecimal,String>String locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
char groupingSeparator
char decimalSeparator
boolean decimalSeparatorAlwaysShown

It returns the String representation of the target number in the given locale. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toStr(Locale.ENGLISH.toString(), 3, 2, 2, ',', '.', true) would return 1,000.00 if target number is 1000
toStr(Locale.ENGLISH.toString(), 2, 2, 4, ',', '.', true) would return 00.00 if target number is 0
toStrFunction<BigDecimal,String>String locale
int minIntegerDigits
int minFractionDigits
int maxFractionDigits
boolean groupingUsed
char decimalSeparator
boolean decimalSeparatorAlwaysShown

It returns the String representation of the target number in the given locale. If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,

toStr(Locale.ENGLISH.toString(), 3, 2, 2, true, ',', true) would return 1,000,00 if target number is 1000
toStr(Locale.ENGLISH.toString(), 2, 2, 4, true, ',', true) would return 00,00 if target number is 0