java.lang.Object
omix.util.text.DecimalFormat
public class DecimalFormat extends Object
This class represents a format pattern for the conversion of floating point numbers to text.
It is a clone of
DecimalFormat
with more functionality.
See DecimalFormat
for basic details.- Since:
- Omix 1.5.4
- Author:
- Dr. Peter Droste
- See Also:
DecimalFormat
-
Constructor Summary
Constructors Constructor Description DecimalFormat(String pattern)
DecimalFormat(String pattern, boolean showRoundNumbersAsInteger)
DecimalFormat(String pattern, RoundingMode roundingMode)
DecimalFormat(String pattern, RoundingMode roundingMode, boolean showRoundNumbersAsInteger)
DecimalFormat(String pattern, RoundingMode roundingMode, DecimalFormatSymbols decimalFormatSymbols)
DecimalFormat(String pattern, RoundingMode roundingMode, DecimalFormatSymbols decimalFormatSymbols, boolean showRoundNumbersAsInteger)
-
Method Summary
Modifier and Type Method Description String
format(Object object)
DecimalFormatSymbols
getDecimalFormatSymbols()
static DecimalFormatSymbols
getDefaultDecimalFormatSymbols()
Returns the default DecimalFormatSymbols specified in the program configuration dialog.static DecimalFormat
getDefaultFormat()
Returns the default decimal format object specified in the program configuration dialog.static DecimalFormat
getDefaultPercentFormat()
Returns the default decimal format for percentage values.static RoundingMode
getDefaultRoundingMode()
Returns the default RoundingMode specified in the program configuration dialog.String
getPattern()
RoundingMode
getRoundingMode()
Number
parse(String trim)
boolean
showRoundNumbersAsInteger()
NumberFormat
toNumberFormat()
-
Constructor Details
-
DecimalFormat
-
DecimalFormat
-
DecimalFormat
-
DecimalFormat
-
DecimalFormat
public DecimalFormat(String pattern, RoundingMode roundingMode, DecimalFormatSymbols decimalFormatSymbols) -
DecimalFormat
public DecimalFormat(String pattern, RoundingMode roundingMode, DecimalFormatSymbols decimalFormatSymbols, boolean showRoundNumbersAsInteger)
-
-
Method Details
-
getPattern
-
getRoundingMode
-
getDecimalFormatSymbols
-
showRoundNumbersAsInteger
public boolean showRoundNumbersAsInteger() -
getDefaultFormat
Returns the default decimal format object specified in the program configuration dialog.- Returns:
- defaultFormat
-
getDefaultPercentFormat
Returns the default decimal format for percentage values.- Returns:
- defaultPercentFormat
-
getDefaultRoundingMode
Returns the default RoundingMode specified in the program configuration dialog.- Returns:
- defaultRoundingMode
-
getDefaultDecimalFormatSymbols
Returns the default DecimalFormatSymbols specified in the program configuration dialog.- Returns:
- defaultDecimalFormatSymbols
-
format
-
parse
- Throws:
ParseException
-
toNumberFormat
-