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 NumberFormatItemcreate()Creates a number format options instance using default or cloning current instance.default NumberFormatItemcreate(IsDefaultNumberFormatOptions defaultValues)Creates a number format options instance using default or cloning current instance.CompactDisplaygetCompactDisplay()Returns the compact display whenNotation.COMPACTis set.CurrencygetCurrency()Returns the currency to use in currency formatting.CurrencyDisplaygetCurrencyDisplay()Returns how to display the currency in currency formatting.CurrencySigngetCurrencySign()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 intgetMaximumFractionDigits()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.intgetMaximumSignificantDigits()Returns the maximum number of significant digits to use.default intgetMinimumFractionDigits()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().intgetMinimumIntegerDigits()Returns the minimum number of integer digits to use.intgetMinimumSignificantDigits()Returns the minimum number of significant digits to use.NotationgetNotation()Returns the formatting that should be displayed for the number.SignDisplaygetSignDisplay()Returns when to display the sign for the number.StylegetStyle()Returns the formatting style to use.MeasureUnitDisplaygetUnitOfMeasureDisplay()Returns the unit formatting style to use in unit formatting.List<MeasureUnit>getUnitsOfMeasure()Returns an unmodifiable list of units to use in unit formatting.booleanisUseGrouping()Returnstruewhether 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.COMPACTis set.- Returns:
- the compact display when
Notation.COMPACTis 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()
Returnstruewhether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.- Returns:
truewhether 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
-
-