Class DefaultNumberFormatOptions
- java.lang.Object
-
- org.pepstock.charba.client.defaults.globals.DefaultBaseFormatOptions
-
- org.pepstock.charba.client.defaults.globals.DefaultNumberFormatOptions
-
- All Implemented Interfaces:
IsDefaultBaseFormatOptions,IsDefaultNumberFormatOptions
public final class DefaultNumberFormatOptions extends DefaultBaseFormatOptions implements IsDefaultNumberFormatOptions
INTL default values for number format options for internationalization.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static IsDefaultNumberFormatOptionsINSTANCEImmutable instance with the number format defaults.
-
Constructor Summary
Constructors Constructor Description DefaultNumberFormatOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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".intgetMaximumSignificantDigits()Returns the maximum number of significant digits to use.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 class org.pepstock.charba.client.defaults.globals.DefaultBaseFormatOptions
getLocaleMatcher, getNumberingSystem
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultBaseFormatOptions
getLocaleMatcher, getNumberingSystem
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultNumberFormatOptions
create, create, getMaximumFractionDigits, getMinimumFractionDigits
-
-
-
-
Field Detail
-
INSTANCE
public static final IsDefaultNumberFormatOptions INSTANCE
Immutable instance with the number format defaults.
-
-
Method Detail
-
getCompactDisplay
public CompactDisplay getCompactDisplay()
Description copied from interface:IsDefaultNumberFormatOptionsReturns the compact display whenNotation.COMPACTis set.- Specified by:
getCompactDisplayin interfaceIsDefaultNumberFormatOptions- Returns:
- the compact display when
Notation.COMPACTis set
-
getCurrency
public Currency getCurrency()
Description copied from interface:IsDefaultNumberFormatOptionsReturns the currency to use in currency formatting.- Specified by:
getCurrencyin interfaceIsDefaultNumberFormatOptions- Returns:
- the currency to use in currency formatting
-
getCurrencyDisplay
public CurrencyDisplay getCurrencyDisplay()
Description copied from interface:IsDefaultNumberFormatOptionsReturns how to display the currency in currency formatting.- Specified by:
getCurrencyDisplayin interfaceIsDefaultNumberFormatOptions- Returns:
- how to display the currency in currency formatting
-
getCurrencySign
public CurrencySign getCurrencySign()
Description copied from interface:IsDefaultNumberFormatOptionsIn 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".- Specified by:
getCurrencySignin interfaceIsDefaultNumberFormatOptions- Returns:
- the currency format to use on formatting
-
getNotation
public Notation getNotation()
Description copied from interface:IsDefaultNumberFormatOptionsReturns the formatting that should be displayed for the number.- Specified by:
getNotationin interfaceIsDefaultNumberFormatOptions- Returns:
- the formatting that should be displayed for the number
-
getSignDisplay
public SignDisplay getSignDisplay()
Description copied from interface:IsDefaultNumberFormatOptionsReturns when to display the sign for the number.- Specified by:
getSignDisplayin interfaceIsDefaultNumberFormatOptions- Returns:
- when to display the sign for the number
-
getStyle
public Style getStyle()
Description copied from interface:IsDefaultNumberFormatOptionsReturns the formatting style to use.- Specified by:
getStylein interfaceIsDefaultNumberFormatOptions- Returns:
- the formatting style to use
-
getUnitsOfMeasure
public List<MeasureUnit> getUnitsOfMeasure()
Description copied from interface:IsDefaultNumberFormatOptionsReturns an unmodifiable list of units to use in unit formatting.- Specified by:
getUnitsOfMeasurein interfaceIsDefaultNumberFormatOptions- Returns:
- an unmodifiable list of unit to use in unit formatting
-
getUnitOfMeasureDisplay
public MeasureUnitDisplay getUnitOfMeasureDisplay()
Description copied from interface:IsDefaultNumberFormatOptionsReturns the unit formatting style to use in unit formatting.- Specified by:
getUnitOfMeasureDisplayin interfaceIsDefaultNumberFormatOptions- Returns:
- the unit formatting style to use in unit formatting
-
isUseGrouping
public boolean isUseGrouping()
Description copied from interface:IsDefaultNumberFormatOptionsReturnstruewhether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.- Specified by:
isUseGroupingin interfaceIsDefaultNumberFormatOptions- Returns:
truewhether to use grouping separators, such as thousands separators or thousand/lakh/crore separators
-
getMinimumIntegerDigits
public int getMinimumIntegerDigits()
Description copied from interface:IsDefaultNumberFormatOptionsReturns the minimum number of integer digits to use.- Specified by:
getMinimumIntegerDigitsin interfaceIsDefaultNumberFormatOptions- Returns:
- the minimum number of integer digits to use
-
getMinimumSignificantDigits
public int getMinimumSignificantDigits()
Description copied from interface:IsDefaultNumberFormatOptionsReturns the minimum number of significant digits to use.- Specified by:
getMinimumSignificantDigitsin interfaceIsDefaultNumberFormatOptions- Returns:
- the minimum number of significant digits to use
-
getMaximumSignificantDigits
public int getMaximumSignificantDigits()
Description copied from interface:IsDefaultNumberFormatOptionsReturns the maximum number of significant digits to use.- Specified by:
getMaximumSignificantDigitsin interfaceIsDefaultNumberFormatOptions- Returns:
- the maximum number of significant digits to use
-
-