Package com.softwaremining.platformutils
Class SMNumberFormat
java.lang.Object
com.softwaremining.platformutils.SMNumberFormat
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringremoveDecimal(int integerSize, Number newValue) Deprecated.static StringremoveExponentFromString(String result) Removes the exponent part of the number.static StringstringifyAndRemoveExponent(Number newValue) Converts the number to a string, ensuring that the exponents representation (E) is not used.
-
Constructor Details
-
SMNumberFormat
public SMNumberFormat()
-
-
Method Details
-
removeDecimal
Deprecated.- Parameters:
newValue-- Returns:
-
stringifyAndRemoveExponent
Converts the number to a string, ensuring that the exponents representation (E) is not used.
For example, 1E12 will be converted to "1000000000000" -
removeExponentFromString
Removes the exponent part of the number. E.g. from "1.2E10" to "12000000000"- Parameters:
result- - a stringified number - e.g. "123", "123.45" or "1,2345E20)- Returns:
-