Class DoubleToStringFormatter
- java.lang.Object
-
- com.adobe.internal.pdftoolkit.core.cos.DoubleToStringFormatter
-
public class DoubleToStringFormatter extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description DoubleToStringFormatter(int numDigits, char decimalPoint, char negativePrefix, boolean limitMaxFracDigits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
appendFormatted(double d)
Returns string representation of double.
-
-
-
Constructor Detail
-
DoubleToStringFormatter
public DoubleToStringFormatter(int numDigits, char decimalPoint, char negativePrefix, boolean limitMaxFracDigits)
- Parameters:
numDigits
- If number of decimal places before decimal points 'x' is less than numDigits then number of places after decimal places should be less that equal than numDigits - xdecimalPoint
- Char which represents decimal point. (for US locale it is .)negativePrefix
- Char representing prefix for negative numbers (for US locale it is -)limitMaxFracDigits
- If set as true numDigits will be max number of digits allowed after decimal places.
-
-
Method Detail
-
appendFormatted
public java.lang.String appendFormatted(double d)
Returns string representation of double. This method returns null in cases where the Java's string representation of this double is not same as that returned by this formatter. In those cases callers of this method should handle number to string conversion themselves.- Parameters:
d
-- Returns:
- String representation of this double
-
-