Class DecimalFormatOperation
- java.lang.Object
-
- de.gebit.integrity.runner.operations.DecimalFormatOperation
-
- All Implemented Interfaces:
Operation<BigDecimal,String[],String>
public class DecimalFormatOperation extends Object implements Operation<BigDecimal,String[],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 Stringexecute(BigDecimal aNumber, String[] someFormatString)Executes the operation logic.
-
-
-
Method Detail
-
execute
public String execute(BigDecimal aNumber, String[] someFormatString)
Description copied from interface:OperationExecutes the operation logic.- Specified by:
executein interfaceOperation<BigDecimal,String[],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
-
-