Just for your information, see the following script
import java.text.DecimalFormat
Map<String, Integer> m = ["OnLoad":0]
println "${m.get("OnLoad")}, ${m.get("OnLoad").getClass().getName()}"
m.put("OnLoad", 1.2345)
println "${m.get("OnLoad")}, ${m.get("OnLoad").getClass().getName()}"
String s = new DecimalFormat("#,###,###,##0").format(m.get("OnLoad"));
println "${s}, ${s.getClass().getName()}"
and the output from it.
2024-06-05 19:50:51.587 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2024-06-05 19:50:51.592 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/MapType
0, java.lang.Integer
1.2345, java.math.BigDecimal
1, java.lang.String
2024-06-05 19:50:52.629 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/MapType
This example tells you that Groovy language is different from Java as far as handing the numeric data types. Groovy is not strict about data types as Java. Groovy converts numeric data types implicity as needed. Then, how Groovy manages conversions of numeric data types? ---- well, I don’t know it. I don’t need to care.
All you need to learn is how to format a numeric value into a String as you like (with or without decimal points).