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 IsDefaultNumberFormatOptions
INSTANCE
Immutable 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 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".int
getMaximumSignificantDigits()
Returns the maximum number of significant digits to use.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 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:IsDefaultNumberFormatOptions
Returns the compact display whenNotation.COMPACT
is set.- Specified by:
getCompactDisplay
in interfaceIsDefaultNumberFormatOptions
- Returns:
- the compact display when
Notation.COMPACT
is set
-
getCurrency
public Currency getCurrency()
Description copied from interface:IsDefaultNumberFormatOptions
Returns the currency to use in currency formatting.- Specified by:
getCurrency
in interfaceIsDefaultNumberFormatOptions
- Returns:
- the currency to use in currency formatting
-
getCurrencyDisplay
public CurrencyDisplay getCurrencyDisplay()
Description copied from interface:IsDefaultNumberFormatOptions
Returns how to display the currency in currency formatting.- Specified by:
getCurrencyDisplay
in interfaceIsDefaultNumberFormatOptions
- Returns:
- how to display the currency in currency formatting
-
getCurrencySign
public CurrencySign getCurrencySign()
Description copied from interface:IsDefaultNumberFormatOptions
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".- Specified by:
getCurrencySign
in interfaceIsDefaultNumberFormatOptions
- Returns:
- the currency format to use on formatting
-
getNotation
public Notation getNotation()
Description copied from interface:IsDefaultNumberFormatOptions
Returns the formatting that should be displayed for the number.- Specified by:
getNotation
in interfaceIsDefaultNumberFormatOptions
- Returns:
- the formatting that should be displayed for the number
-
getSignDisplay
public SignDisplay getSignDisplay()
Description copied from interface:IsDefaultNumberFormatOptions
Returns when to display the sign for the number.- Specified by:
getSignDisplay
in interfaceIsDefaultNumberFormatOptions
- Returns:
- when to display the sign for the number
-
getStyle
public Style getStyle()
Description copied from interface:IsDefaultNumberFormatOptions
Returns the formatting style to use.- Specified by:
getStyle
in interfaceIsDefaultNumberFormatOptions
- Returns:
- the formatting style to use
-
getUnitsOfMeasure
public List<MeasureUnit> getUnitsOfMeasure()
Description copied from interface:IsDefaultNumberFormatOptions
Returns an unmodifiable list of units to use in unit formatting.- Specified by:
getUnitsOfMeasure
in interfaceIsDefaultNumberFormatOptions
- Returns:
- an unmodifiable list of unit to use in unit formatting
-
getUnitOfMeasureDisplay
public MeasureUnitDisplay getUnitOfMeasureDisplay()
Description copied from interface:IsDefaultNumberFormatOptions
Returns the unit formatting style to use in unit formatting.- Specified by:
getUnitOfMeasureDisplay
in interfaceIsDefaultNumberFormatOptions
- Returns:
- the unit formatting style to use in unit formatting
-
isUseGrouping
public boolean isUseGrouping()
Description copied from interface:IsDefaultNumberFormatOptions
Returnstrue
whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.- Specified by:
isUseGrouping
in interfaceIsDefaultNumberFormatOptions
- Returns:
true
whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators
-
getMinimumIntegerDigits
public int getMinimumIntegerDigits()
Description copied from interface:IsDefaultNumberFormatOptions
Returns the minimum number of integer digits to use.- Specified by:
getMinimumIntegerDigits
in interfaceIsDefaultNumberFormatOptions
- Returns:
- the minimum number of integer digits to use
-
getMinimumSignificantDigits
public int getMinimumSignificantDigits()
Description copied from interface:IsDefaultNumberFormatOptions
Returns the minimum number of significant digits to use.- Specified by:
getMinimumSignificantDigits
in interfaceIsDefaultNumberFormatOptions
- Returns:
- the minimum number of significant digits to use
-
getMaximumSignificantDigits
public int getMaximumSignificantDigits()
Description copied from interface:IsDefaultNumberFormatOptions
Returns the maximum number of significant digits to use.- Specified by:
getMaximumSignificantDigits
in interfaceIsDefaultNumberFormatOptions
- Returns:
- the maximum number of significant digits to use
-
-