Package org.apache.commons.text.numbers
Interface ParsedDecimal.FormatOptions
- All Known Implementing Classes:
DoubleFormat.AbstractDoubleFormat,DoubleFormat.EngineeringDoubleFormat,DoubleFormat.MixedDoubleFormat,DoubleFormat.PlainDoubleFormat,DoubleFormat.ScientificDoubleFormat
- Enclosing class:
ParsedDecimal
static interface ParsedDecimal.FormatOptions
Interface containing values used during string formatting.
-
Method Summary
Modifier and TypeMethodDescriptioncharGet the decimal separator character.char[]Get an array containing the localized digit characters 0-9 in that order.char[]Get the exponent separator as an array of characters.charGet the character used to separate thousands groupings.charGet the minus sign character.booleanReturntrueif exponent values should always be included in formatted output, even if the value is zero.booleanReturntrueif thousands should be grouped.booleanReturntrueif fraction placeholders (e.g.,".0"in"1.0") should be included.booleanReturntrueif the string zero should be prefixed with the minus sign for negative zero values.
-
Method Details
-
getDecimalSeparator
char getDecimalSeparator()Get the decimal separator character.- Returns:
- decimal separator character
-
getDigits
char[] getDigits()Get an array containing the localized digit characters 0-9 in that order. This string must be non-null and have a length of 10.- Returns:
- array containing the digit characters 0-9
-
getExponentSeparatorChars
char[] getExponentSeparatorChars()Get the exponent separator as an array of characters.- Returns:
- exponent separator as an array of characters
-
getGroupingSeparator
char getGroupingSeparator()Get the character used to separate thousands groupings.- Returns:
- character used to separate thousands groupings
-
getMinusSign
char getMinusSign()Get the minus sign character.- Returns:
- minus sign character
-
isAlwaysIncludeExponent
boolean isAlwaysIncludeExponent()Returntrueif exponent values should always be included in formatted output, even if the value is zero.- Returns:
trueif exponent values should always be included
-
isGroupThousands
boolean isGroupThousands()Returntrueif thousands should be grouped.- Returns:
trueif thousand should be grouped
-
isIncludeFractionPlaceholder
boolean isIncludeFractionPlaceholder()Returntrueif fraction placeholders (e.g.,".0"in"1.0") should be included.- Returns:
trueif fraction placeholders should be included
-
isSignedZero
boolean isSignedZero()Returntrueif the string zero should be prefixed with the minus sign for negative zero values.- Returns:
trueif the minus zero string should be allowed
-