Interface IsDefaultNumberFormatOptions
-
- All Superinterfaces:
IsDefaultBaseFormatOptions
- All Known Subinterfaces:
IsNumberFormat
- All Known Implementing Classes:
AbstractNumberFormat
,DefaultNumberFormatOptions
,NumberFormatItem
,NumberFormatOptions
,TicksNumberFormat
public interface IsDefaultNumberFormatOptions extends IsDefaultBaseFormatOptions
Interface to define the number format options for internationalization.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default NumberFormatItem
create()
Creates a number format options instance using default or cloning current instance.default NumberFormatItem
create(IsDefaultNumberFormatOptions defaultValues)
Creates a number format options instance using default or cloning current instance.CompactDisplay
getCompactDisplay()
Returns the compact display whenNotation.COMPACT
is set.Currency
getCurrency()
Returns the currency to use in currency formatting.CurrencyDisplay
getCurrencyDisplay()
Returns how to display the currency in currency formatting.CurrencySign
getCurrencySign()
In many locales, accounting format means to wrap the number with parentheses instead of appending a minus sign.
You can enable this formatting by setting the currency sign option to "accounting" otherwise "standard".default int
getMaximumFractionDigits()
Returns the maximum number of fraction digits to use.
The default for plain number formatting is the larger ofNumberFormatOptions.getMinimumFractionDigits()
and 3.
The default for currency formatting is the larger ofNumberFormatOptions.getMinimumFractionDigits()
and the number of minor unit digits provided by currency, seeCurrency.getMinimumFractionDigits()
.
The default for percent formatting is the larger ofNumberFormatOptions.getMinimumFractionDigits()
and 0.int
getMaximumSignificantDigits()
Returns the maximum number of significant digits to use.default int
getMinimumFractionDigits()
Returns the minimum number of fraction digits to use.
The default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the currency, seeCurrency.getMinimumFractionDigits()
.int
getMinimumIntegerDigits()
Returns the minimum number of integer digits to use.int
getMinimumSignificantDigits()
Returns the minimum number of significant digits to use.Notation
getNotation()
Returns the formatting that should be displayed for the number.SignDisplay
getSignDisplay()
Returns when to display the sign for the number.Style
getStyle()
Returns the formatting style to use.MeasureUnitDisplay
getUnitOfMeasureDisplay()
Returns the unit formatting style to use in unit formatting.List<MeasureUnit>
getUnitsOfMeasure()
Returns an unmodifiable list of units to use in unit formatting.boolean
isUseGrouping()
Returnstrue
whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultBaseFormatOptions
getLocaleMatcher, getNumberingSystem
-
-
-
-
Method Detail
-
getCompactDisplay
CompactDisplay getCompactDisplay()
Returns the compact display whenNotation.COMPACT
is set.- Returns:
- the compact display when
Notation.COMPACT
is set
-
getCurrency
Currency getCurrency()
Returns the currency to use in currency formatting.- Returns:
- the currency to use in currency formatting
-
getCurrencyDisplay
CurrencyDisplay getCurrencyDisplay()
Returns how to display the currency in currency formatting.- Returns:
- how to display the currency in currency formatting
-
getCurrencySign
CurrencySign getCurrencySign()
In many locales, accounting format means to wrap the number with parentheses instead of appending a minus sign.
You can enable this formatting by setting the currency sign option to "accounting" otherwise "standard".- Returns:
- the currency format to use on formatting
-
getNotation
Notation getNotation()
Returns the formatting that should be displayed for the number.- Returns:
- the formatting that should be displayed for the number
-
getSignDisplay
SignDisplay getSignDisplay()
Returns when to display the sign for the number.- Returns:
- when to display the sign for the number
-
getStyle
Style getStyle()
Returns the formatting style to use.- Returns:
- the formatting style to use
-
getUnitsOfMeasure
List<MeasureUnit> getUnitsOfMeasure()
Returns an unmodifiable list of units to use in unit formatting.- Returns:
- an unmodifiable list of unit to use in unit formatting
-
getUnitOfMeasureDisplay
MeasureUnitDisplay getUnitOfMeasureDisplay()
Returns the unit formatting style to use in unit formatting.- Returns:
- the unit formatting style to use in unit formatting
-
isUseGrouping
boolean isUseGrouping()
Returnstrue
whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.- Returns:
true
whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators
-
getMinimumIntegerDigits
int getMinimumIntegerDigits()
Returns the minimum number of integer digits to use.- Returns:
- the minimum number of integer digits to use
-
getMinimumFractionDigits
default int getMinimumFractionDigits()
Returns the minimum number of fraction digits to use.
The default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the currency, seeCurrency.getMinimumFractionDigits()
.- Returns:
- the minimum number of fraction digits to use.
The default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the currency, seeCurrency.getMinimumFractionDigits()
-
getMaximumFractionDigits
default int getMaximumFractionDigits()
Returns the maximum number of fraction digits to use.
The default for plain number formatting is the larger ofNumberFormatOptions.getMinimumFractionDigits()
and 3.
The default for currency formatting is the larger ofNumberFormatOptions.getMinimumFractionDigits()
and the number of minor unit digits provided by currency, seeCurrency.getMinimumFractionDigits()
.
The default for percent formatting is the larger ofNumberFormatOptions.getMinimumFractionDigits()
and 0.- Returns:
- the maximum number of fraction digits to use.
The default for plain number formatting is the larger ofNumberFormatOptions.getMinimumFractionDigits()
and 3.
The default for currency formatting is the larger ofNumberFormatOptions.getMinimumFractionDigits()
and the number of minor unit digits provided by currency, seeCurrency.getMinimumFractionDigits()
.
The default for percent formatting is the larger ofNumberFormatOptions.getMinimumFractionDigits()
and 0.
-
getMinimumSignificantDigits
int getMinimumSignificantDigits()
Returns the minimum number of significant digits to use.- Returns:
- the minimum number of significant digits to use
-
getMaximumSignificantDigits
int getMaximumSignificantDigits()
Returns the maximum number of significant digits to use.- Returns:
- the maximum number of significant digits to use
-
create
default NumberFormatItem create()
Creates a number format options instance using default or cloning current instance.- Returns:
- a number format options instance using default or cloning current instance
-
create
default NumberFormatItem create(IsDefaultNumberFormatOptions defaultValues)
Creates a number format options instance using default or cloning current instance.- Parameters:
defaultValues
- default provider- Returns:
- a number format options instance using default or cloning current instance
-
-