com.squarespace.cldrengine.api.Numbers Maven / Gradle / Ivy
The newest version!
package com.squarespace.cldrengine.api;
import java.util.List;
public interface Numbers {
/**
* Adjusts a decimal number using the given options.
*/
Decimal adjustDecimal(Decimal num);
/**
* Adjusts a decimal number using the given options.
*/
Decimal adjustDecimal(Decimal num, DecimalAdjustOptions options);
/**
* Formats a decimal number to string.
*/
String formatDecimal(Decimal n);
/**
* Formats a decimal number to string.
*/
String formatDecimal(Decimal n, DecimalFormatOptions options);
/**
* Formats a decimal number to an array of parts.
*/
List formatDecimalToParts(Decimal n);
/**
* Formats a decimal number to an array of parts.
*/
List formatDecimalToParts(Decimal n, DecimalFormatOptions options);
/**
* Formats a currency value to string.
*/
String formatCurrency(Decimal n, CurrencyType code);
/**
* Formats a currency value to string.
*/
String formatCurrency(Decimal n, CurrencyType code, CurrencyFormatOptions options);
/**
* Formats a currency value to an array of parts.
*/
List formatCurrencyToParts(Decimal n, CurrencyType code);
/**
* Formats a currency value to an array of parts.
*/
List formatCurrencyToParts(Decimal n, CurrencyType code, CurrencyFormatOptions options);
/**
* Returns the currency symbol of the given width.
*/
String getCurrencySymbol(CurrencyType code);
/**
* Returns the currency symbol of the given width.
*/
String getCurrencySymbol(CurrencyType code, CurrencySymbolWidthType width);
/**
* Returns the display name of the currency.
*/
String getCurrencyDisplayName(CurrencyType code);
/**
* Returns the display name of the currency.
*/
String getCurrencyDisplayName(CurrencyType code, CurrencyDisplayNameOptions options);
/**
* Returns the pluralized display name of the currency.
*/
String getCurrencyPluralName(Decimal n, CurrencyType code);
/**
* Returns the pluralized display name of the currency.
*/
String getCurrencyPluralName(Decimal n, CurrencyType code, CurrencyDisplayNameOptions options);
/**
* Return the currency fraction info for a given currency code.
*/
CurrencyFractions getCurrencyFractions(CurrencyType code);
/**
* Return the currency code to use for a given region.
*/
CurrencyType getCurrencyForRegion(String region);
/**
* Returns the plural cardinal category of the given decimal number.
*/
PluralType getPluralCardinal(Decimal n);
/**
* Returns the plural cardinal category of the given decimal number.
*/
PluralType getPluralCardinal(Decimal n, DecimalAdjustOptions options);
/**
* Returns the plural ordinal 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);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy