Package com.squarespace.cldrengine.api
Interface Numbers
-
- All Known Implementing Classes:
NumbersImpl
public interface Numbers
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Decimal
adjustDecimal(Decimal num)
Adjusts a decimal number using the given options.Decimal
adjustDecimal(Decimal num, DecimalAdjustOptions options)
Adjusts a decimal number using the given options.java.lang.String
formatCurrency(Decimal n, CurrencyType code)
Formats a currency value to string.java.lang.String
formatCurrency(Decimal n, CurrencyType code, CurrencyFormatOptions options)
Formats a currency value to string.java.util.List<Part>
formatCurrencyToParts(Decimal n, CurrencyType code)
Formats a currency value to an array of parts.java.util.List<Part>
formatCurrencyToParts(Decimal n, CurrencyType code, CurrencyFormatOptions options)
Formats a currency value to an array of parts.java.lang.String
formatDecimal(Decimal n)
Formats a decimal number to string.java.lang.String
formatDecimal(Decimal n, DecimalFormatOptions options)
Formats a decimal number to string.java.util.List<Part>
formatDecimalToParts(Decimal n)
Formats a decimal number to an array of parts.java.util.List<Part>
formatDecimalToParts(Decimal n, DecimalFormatOptions options)
Formats a decimal number to an array of parts.java.lang.String
getCurrencyDisplayName(CurrencyType code)
Returns the display name of the currency.java.lang.String
getCurrencyDisplayName(CurrencyType code, CurrencyDisplayNameOptions options)
Returns the display name of the currency.CurrencyType
getCurrencyForRegion(java.lang.String region)
Return the currency code to use for a given region.CurrencyFractions
getCurrencyFractions(CurrencyType code)
Return the currency fraction info for a given currency code.java.lang.String
getCurrencyPluralName(Decimal n, CurrencyType code)
Returns the pluralized display name of the currency.java.lang.String
getCurrencyPluralName(Decimal n, CurrencyType code, CurrencyDisplayNameOptions options)
Returns the pluralized display name of the currency.java.lang.String
getCurrencySymbol(CurrencyType code)
Returns the currency symbol of the given width.java.lang.String
getCurrencySymbol(CurrencyType code, CurrencySymbolWidthType width)
Returns the currency symbol of the given width.PluralType
getPluralCardinal(Decimal n)
Returns the plural cardinal category of the given decimal number.PluralType
getPluralCardinal(Decimal n, DecimalAdjustOptions options)
Returns the plural cardinal category of the given decimal number.PluralType
getPluralOrdinal(Decimal n)
Returns the plural ordinal category of the given decimal number.PluralType
getPluralOrdinal(Decimal n, DecimalAdjustOptions options)
Returns the plural ordinal category of the given decimal number.
-
-
-
Method Detail
-
adjustDecimal
Decimal adjustDecimal(Decimal num, DecimalAdjustOptions options)
Adjusts a decimal number using the given options.
-
formatDecimal
java.lang.String formatDecimal(Decimal n)
Formats a decimal number to string.
-
formatDecimal
java.lang.String formatDecimal(Decimal n, DecimalFormatOptions options)
Formats a decimal number to string.
-
formatDecimalToParts
java.util.List<Part> formatDecimalToParts(Decimal n)
Formats a decimal number to an array of parts.
-
formatDecimalToParts
java.util.List<Part> formatDecimalToParts(Decimal n, DecimalFormatOptions options)
Formats a decimal number to an array of parts.
-
formatCurrency
java.lang.String formatCurrency(Decimal n, CurrencyType code)
Formats a currency value to string.
-
formatCurrency
java.lang.String formatCurrency(Decimal n, CurrencyType code, CurrencyFormatOptions options)
Formats a currency value to string.
-
formatCurrencyToParts
java.util.List<Part> formatCurrencyToParts(Decimal n, CurrencyType code)
Formats a currency value to an array of parts.
-
formatCurrencyToParts
java.util.List<Part> formatCurrencyToParts(Decimal n, CurrencyType code, CurrencyFormatOptions options)
Formats a currency value to an array of parts.
-
getCurrencySymbol
java.lang.String getCurrencySymbol(CurrencyType code)
Returns the currency symbol of the given width.
-
getCurrencySymbol
java.lang.String getCurrencySymbol(CurrencyType code, CurrencySymbolWidthType width)
Returns the currency symbol of the given width.
-
getCurrencyDisplayName
java.lang.String getCurrencyDisplayName(CurrencyType code)
Returns the display name of the currency.
-
getCurrencyDisplayName
java.lang.String getCurrencyDisplayName(CurrencyType code, CurrencyDisplayNameOptions options)
Returns the display name of the currency.
-
getCurrencyPluralName
java.lang.String getCurrencyPluralName(Decimal n, CurrencyType code)
Returns the pluralized display name of the currency.
-
getCurrencyPluralName
java.lang.String getCurrencyPluralName(Decimal n, CurrencyType code, CurrencyDisplayNameOptions options)
Returns the pluralized display name of the currency.
-
getCurrencyFractions
CurrencyFractions getCurrencyFractions(CurrencyType code)
Return the currency fraction info for a given currency code.
-
getCurrencyForRegion
CurrencyType getCurrencyForRegion(java.lang.String region)
Return the currency code to use for a given region.
-
getPluralCardinal
PluralType getPluralCardinal(Decimal n)
Returns the plural cardinal category of the given decimal number.
-
getPluralCardinal
PluralType getPluralCardinal(Decimal n, DecimalAdjustOptions options)
Returns the plural cardinal category of the given decimal number.
-
getPluralOrdinal
PluralType getPluralOrdinal(Decimal n)
Returns the plural ordinal category of the given decimal number.
-
getPluralOrdinal
PluralType getPluralOrdinal(Decimal n, DecimalAdjustOptions options)
Returns the plural ordinal category of the given decimal number.
-
-