Class DecimalFormatOperation
- java.lang.Object
-
- de.gebit.integrity.runner.operations.DecimalFormatOperation
-
- All Implemented Interfaces:
Operation<java.math.BigDecimal,java.lang.String[],java.lang.String>
public class DecimalFormatOperation extends java.lang.Object implements Operation<java.math.BigDecimal,java.lang.String[],java.lang.String>
This operation formats a decimal number using a given format string. Meant to be used like:
(123.5 formatted with "0.00")
Optionally, you can also add a language identifier to the postfix param list in order to specify the locale to be used for the conversion, like this:
(123.5 formatted with "0.00", "de")
or: (123.5 formatted with "0.00", "deDE")- Author:
- Rene Schneider - initial API and implementation
-
-
Constructor Summary
Constructors Constructor Description DecimalFormatOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
execute(java.math.BigDecimal aNumber, java.lang.String[] someFormatString)
Executes the operation logic.
-
-
-
Method Detail
-
execute
public java.lang.String execute(java.math.BigDecimal aNumber, java.lang.String[] someFormatString)
Description copied from interface:Operation
Executes the operation logic.- Specified by:
execute
in interfaceOperation<java.math.BigDecimal,java.lang.String[],java.lang.String>
- Parameters:
aNumber
- the prefix parameter, or null if none was given or the value is not available at the time of the callsomeFormatString
- the postfix parameter, or null if none was given or the value is not available at the time of the call- Returns:
- the result value
-
-