Class DoubleToStringFormatter
java.lang.Object
com.adobe.internal.pdftoolkit.core.cos.DoubleToStringFormatter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDoubleToStringFormatter(int numDigits, char decimalPoint, char negativePrefix, boolean limitMaxFracDigits) -
Method Summary
Modifier and TypeMethodDescriptionappendFormatted(double d) Returns string representation of double.
-
Field Details
-
INFINITY
public static final char[] INFINITY -
NaN
public static final char[] NaN -
ZEROS
public static final char[][] ZEROS
-
-
Constructor Details
-
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 Details
-
appendFormatted
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
-