Interface IsNumberFormat
-
- All Superinterfaces:
IsDefaultBaseFormatOptions
,IsDefaultNumberFormatOptions
- All Known Implementing Classes:
AbstractNumberFormat
,NumberFormatItem
,TicksNumberFormat
public interface IsNumberFormat extends IsDefaultNumberFormatOptions
Defines a configuration element which is a number format options.- Author:
- Andrea "Stock" Stocchero
- See Also:
AbstractNumberFormat
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setCompactDisplay(CompactDisplay display)
Set the compact display whenNotation.COMPACT
is set.void
setCurrency(Currency currency)
Sets the currency to use in currency formatting.void
setCurrencyDisplay(CurrencyDisplay currencyDisplay)
Sets how to display the currency in currency formatting.void
setCurrencySign(CurrencySign currencySign)
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".void
setLocaleMatcher(LocaleMatcher localeMatcher)
Sets the locale matching algorithm to use.void
setMaximumFractionDigits(int maximumFractionDigits)
Sets the maximum number of fraction digits to use.
Possible values are from 0 to 20.void
setMaximumSignificantDigits(int minimumIntegerDigits)
Sets the maximum number of significant digits to use.
Possible values are from 1 to 21.void
setMinimumFractionDigits(int minimumFractionDigits)
Sets the minimum number of fraction digits to use.
Possible values are from 0 to 20.void
setMinimumIntegerDigits(int minimumIntegerDigits)
Sets the minimum number of integer digits to use.
Possible values are from 1 to 21.void
setMinimumSignificantDigits(int minimumIntegerDigits)
Sets the minimum number of significant digits to use.
Possible values are from 1 to 21.void
setNotation(Notation notation)
Sets the formatting that should be displayed for the number.void
setNumberingSystem(NumberingSystem numberingSystem)
Sets the numbering system to use.void
setSignDisplay(SignDisplay signDisplay)
Sets when to display the sign for the number.void
setStyle(Style style)
Sets the formatting style to use.void
setUnitOfMeasureDisplay(MeasureUnitDisplay unitDisplay)
Sets the unit formatting style to use in unit formatting.void
setUnitsOfMeasure(List<MeasureUnit> units)
Sets the unit to use in unit formatting.
If more that 1 unit has been passed, a compound unit has been created.void
setUnitsOfMeasure(MeasureUnit... units)
Sets the unit to use in unit formatting.
If more that 1 unit has been passed, a compound unit has been created.void
setUseGrouping(boolean useGrouping)
Setstrue
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
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultNumberFormatOptions
create, create, getCompactDisplay, getCurrency, getCurrencyDisplay, getCurrencySign, getMaximumFractionDigits, getMaximumSignificantDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getMinimumSignificantDigits, getNotation, getSignDisplay, getStyle, getUnitOfMeasureDisplay, getUnitsOfMeasure, isUseGrouping
-
-
-
-
Method Detail
-
setLocaleMatcher
void setLocaleMatcher(LocaleMatcher localeMatcher)
Sets the locale matching algorithm to use.- Parameters:
localeMatcher
- the locale matching algorithm to use
-
setNumberingSystem
void setNumberingSystem(NumberingSystem numberingSystem)
Sets the numbering system to use.- Parameters:
numberingSystem
- the numbering system to use
-
setCompactDisplay
void setCompactDisplay(CompactDisplay display)
Set the compact display whenNotation.COMPACT
is set.- Parameters:
display
- the compact display whenNotation.COMPACT
is set
-
setCurrency
void setCurrency(Currency currency)
Sets the currency to use in currency formatting.- Parameters:
currency
- the currency to use in currency formatting
-
setCurrencyDisplay
void setCurrencyDisplay(CurrencyDisplay currencyDisplay)
Sets how to display the currency in currency formatting.- Parameters:
currencyDisplay
- how to display the currency in currency formatting
-
setCurrencySign
void setCurrencySign(CurrencySign currencySign)
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".- Parameters:
currencySign
- the currency format to use on formatting
-
setNotation
void setNotation(Notation notation)
Sets the formatting that should be displayed for the number.- Parameters:
notation
- the formatting that should be displayed for the number
-
setSignDisplay
void setSignDisplay(SignDisplay signDisplay)
Sets when to display the sign for the number.- Parameters:
signDisplay
- when to display the sign for the number
-
setStyle
void setStyle(Style style)
Sets the formatting style to use.- Parameters:
style
- the formatting style to use
-
setUnitsOfMeasure
void setUnitsOfMeasure(MeasureUnit... units)
Sets the unit to use in unit formatting.
If more that 1 unit has been passed, a compound unit has been created.- Parameters:
units
- the units to use in units formatting
-
setUnitsOfMeasure
void setUnitsOfMeasure(List<MeasureUnit> units)
Sets the unit to use in unit formatting.
If more that 1 unit has been passed, a compound unit has been created.- Parameters:
units
- the units to use in units formatting
-
setUnitOfMeasureDisplay
void setUnitOfMeasureDisplay(MeasureUnitDisplay unitDisplay)
Sets the unit formatting style to use in unit formatting.- Parameters:
unitDisplay
- the unit formatting style to use in unit formatting
-
setUseGrouping
void setUseGrouping(boolean useGrouping)
Setstrue
whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.- Parameters:
useGrouping
-true
whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators
-
setMinimumIntegerDigits
void setMinimumIntegerDigits(int minimumIntegerDigits)
Sets the minimum number of integer digits to use.
Possible values are from 1 to 21.- Parameters:
minimumIntegerDigits
- the minimum number of integer digits to use
-
setMinimumFractionDigits
void setMinimumFractionDigits(int minimumFractionDigits)
Sets the minimum number of fraction digits to use.
Possible values are from 0 to 20.- Parameters:
minimumFractionDigits
- the minimum number of fraction digits to use
-
setMaximumFractionDigits
void setMaximumFractionDigits(int maximumFractionDigits)
Sets the maximum number of fraction digits to use.
Possible values are from 0 to 20.- Parameters:
maximumFractionDigits
- the maximum number of fraction digits to use
-
setMinimumSignificantDigits
void setMinimumSignificantDigits(int minimumIntegerDigits)
Sets the minimum number of significant digits to use.
Possible values are from 1 to 21.- Parameters:
minimumIntegerDigits
- the minimum number of significant digits to use
-
setMaximumSignificantDigits
void setMaximumSignificantDigits(int minimumIntegerDigits)
Sets the maximum number of significant digits to use.
Possible values are from 1 to 21.- Parameters:
minimumIntegerDigits
- the maximum number of significant digits to use
-
-