/** * Return a new millicoin-denominated formatter for the given locale. The returned object * will format the fractional part of numbers with two decimal places, rounding as * necessary. */ public static BtcFormat getMilliInstance(Locale locale) { return getInstance(MILLICOIN_SCALE, locale, 2); }
/** * Return a new auto-formatter with the given style for the given locale. * The returned object that will auto-denominate each formatted value, and * will indicate that denomination using either a currency code, such as * "<code>BTC</code>", or symbol, such as "<code>฿</code>", depending on the value * of the first argument. * <p>The number of fractional decimal places in formatted number will be two, or fewer * as necessary to avoid giving a place to fractional satoshis. */ public static BtcFormat getInstance(Style style, Locale locale) { return getInstance(style, locale, 2); }
/** * Return a new coin-denominated formatter for the given locale. The returned object will * format the fractional part of numbers with two decimal places, rounding as necessary. */ public static BtcFormat getCoinInstance(Locale locale) { return getInstance(COIN_SCALE, locale, 2); }
/** * Return a new millicoin-denominated formatter for the given locale. The returned object * will format the fractional part of numbers with two decimal places, rounding as * necessary. */ public static BtcFormat getMilliInstance(Locale locale) { return getInstance(MILLICOIN_SCALE, locale, 2); }
/** * Return a new code-style auto-formatter for the given locale. The returned object will * select denominational units based on each value being formatted, and will indicate those * units using a currency code, for example, <code>"mBTC"</code>. */ public static BtcFormat getCodeInstance(Locale locale) { return getInstance(CODE, locale); }
/** * Return a new symbol-style auto-formatter for the given locale. The returned object will * select denominational units based on each value being formatted, and will indicate those * units using a currency symbol, for example, <code>"µ฿"</code>. */ public static BtcFormat getSymbolInstance(Locale locale) { return getInstance(SYMBOL, locale); }
/** * Return a new code-style auto-formatter for the given locale with the given number of * fraction places. The returned object will select denominational units based on each * value being formatted, and will indicate those units using a currency code, for example, * <code>"mBTC"</code>. The returned object will format the fraction-part of numbers using * the given number of decimal places, or fewer as necessary to avoid giving a place to * fractional satoshis. */ public static BtcFormat getCodeInstance(Locale locale, int minDecimals) { return getInstance(CODE, locale, minDecimals); }
/** * Return a new coin-denominated formatter for the given locale. The returned object will * format the fractional part of numbers with two decimal places, rounding as necessary. */ public static BtcFormat getCoinInstance(Locale locale) { return getInstance(COIN_SCALE, locale, 2); }
/** * Return a new fixeed-denomination formatter for the given locale. The first argument * specifies the denomination as the size of the shift from coin-denomination in * increasingly-precise decimal places. The returned object will format and parse values * according to the locale specified by the second argument, and will format the fractional * part of numbers with two decimal places, or fewer as necessary to avoid giving a place * to fractional satoshis. */ public static BtcFormat getInstance(int scale, Locale locale) { return getInstance(scale, locale, 2); }
/** * Return a new symbol-style auto-formatter for the given locale with the given number of * fraction places. The returned object will select denominational units based on each * value being formatted, and will indicate those units using a currency symbol, for example, * <code>"µ฿"</code>. The returned object will format the fraction-part of numbers using * the given number of decimal places, or fewer as necessary to avoid giving a place to * fractional satoshis. */ public static BtcFormat getSymbolInstance(Locale locale, int fractionPlaces) { return getInstance(SYMBOL, locale, fractionPlaces); }
/** * Return a new symbol-style auto-formatter for the given locale with the given number of * fraction places. The returned object will select denominational units based on each * value being formatted, and will indicate those units using a currency symbol, for example, * <code>"µ฿"</code>. The returned object will format the fraction-part of numbers using * the given number of decimal places, or fewer as necessary to avoid giving a place to * fractional satoshis. */ public static BtcFormat getSymbolInstance(Locale locale, int fractionPlaces) { return getInstance(SYMBOL, locale, fractionPlaces); }
/** * Return a new auto-formatter with the given style for the given locale. * The returned object that will auto-denominate each formatted value, and * will indicate that denomination using either a currency code, such as * "<code>BTC</code>", or symbol, such as "<code>฿</code>", depending on the value * of the first argument. * <p>The number of fractional decimal places in formatted number will be two, or fewer * as necessary to avoid giving a place to fractional satoshis. */ public static BtcFormat getInstance(Style style, Locale locale) { return getInstance(style, locale, 2); }
/** * Return a new coin-denominated formatter for the given locale. The returned object will * format the fractional part of numbers with two decimal places, rounding as necessary. */ public static BtcFormat getCoinInstance(Locale locale) { return getInstance(COIN_SCALE, locale, 2); }
/** * Return a newly-constructed instance for the given locale that will format * values in terms of bitcoins, with the given minimum number of fractional * decimal places. Optionally, repeating integer arguments can be passed, each * indicating the size of an additional group of fractional decimal places to be * used as necessary to avoid rounding, to a limiting precision of satoshis. */ public static BtcFormat getCoinInstance(Locale locale, int scale, int... groups) { return getInstance(COIN_SCALE, locale, scale, boxAsList(groups)); }
/** * Return a new microcoin-denominated formatter for the given locale with the specified * fractional decimal placing. The returned object will format the fractional part of * numbers with the given minimum number of fractional decimal places. Optionally, * repeating integer arguments can be passed, each indicating the size of an additional * group of fractional decimal places to be used as necessary to avoid rounding, to a * limiting precision of satoshis. */ public static BtcFormat getMicroInstance(Locale locale, int scale, int... groups) { return getInstance(MICROCOIN_SCALE, locale, scale, boxAsList(groups)); }
/** * Return a new auto-denominating formatter. The returned object will indicate the * denominational units of formatted values using either a currency symbol, such as, * <code>"฿"</code>, or code, such as <code>"mBTC"</code>, depending on the value of * the argument. Formatting and parsing will be done according to the default locale. */ public static BtcFormat getInstance(Style style) { return getInstance(style, defaultLocale()); }
/** * Return a new fixeed-denomination formatter. The argument specifies the denomination as * the size of the shift from coin-denomination in increasingly-precise decimal places. * The returned object will format and parse values according to the default locale, and * will format the fractional part of numbers with two decimal places, or fewer as * necessary to avoid giving a place to fractional satoshis. */ public static BtcFormat getInstance(int scale) { return getInstance(scale, defaultLocale()); }
/** * Return a new microcoin-denominated formatter with the specified fractional decimal * placing. The returned object will format and parse values according to the default * locale, and will format the fractional part of numbers with the given minimum number of * fractional decimal places. Optionally, repeating integer arguments can be passed, each * indicating the size of an additional group of fractional decimal places to be used as * necessary to avoid rounding, to a limiting precision of satoshis. */ public static BtcFormat getMicroInstance(int scale, int... groups) { return getInstance(MICROCOIN_SCALE, defaultLocale(), scale, boxAsList(groups)); }
/** * Return a new microcoin-denominated formatter with the specified fractional decimal * placing. The returned object will format and parse values according to the default * locale, and will format the fractional part of numbers with the given minimum number of * fractional decimal places. Optionally, repeating integer arguments can be passed, each * indicating the size of an additional group of fractional decimal places to be used as * necessary to avoid rounding, to a limiting precision of satoshis. */ public static BtcFormat getMicroInstance(int scale, int... groups) { return getInstance(MICROCOIN_SCALE, defaultLocale(), scale, boxAsList(groups)); }
/** * Return a new coin-denominated formatter with the specified fraction-places. The * returned object will format and parse values according to the default locale, and will * format the fraction part of numbers with at least two decimal places. The sizes of * additional groups of decimal places can be specified by a variable number of * <code>int</code> arguments. Each optional decimal-place group will be applied only if * useful for expressing precision, and will be only partially applied if necessary to * avoid giving a place to fractional satoshis. */ public static BtcFormat getCoinInstance(int minFractionPlaces, int... groups) { return getInstance(COIN_SCALE, defaultLocale(), minFractionPlaces, boxAsList(groups)); }