/*
(non-Javadoc)
@see
MonetaryAmountFormatProviderSpi#getFormat(AmountFormatContext)
970047
@Override
    public Collection<MonetaryAmountFormat> getAmountFormats(AmountFormatQuery amountFormatQuery) {
        Objects.requireNonNull(amountFormatQuery, "AmountFormatContext required");
        if (!amountFormatQuery.getProviderNames().isEmpty() &&
                !amountFormatQuery.getProviderNames().contains(getProviderName())) {
            return Collections.emptySet();
        }
        if (!(amountFormatQuery.getFormatName() == null || DEFAULT_FORMAT.equals(amountFormatQuery.getFormatName()))) {
            return Collections.emptySet();
        }
        AmountFormatContextBuilder builder = AmountFormatContextBuilder.of(DEFAULT_FORMAT);
        if (amountFormatQuery.getLocale() != null) {
            builder.setLocale(amountFormatQuery.getLocale());
        }
        builder.importContext(amountFormatQuery, false);
        builder.setMonetaryAmountFactory(amountFormatQuery.getMonetaryAmountFactory());
        return Arrays.asList(new MonetaryAmountFormat[]{new DefaultMonetaryAmountFormat(builder.build())});
    }
301699
@Override
    public MonetaryAmount apply(MonetaryAmount amount) {
        return amount.getFactory().setCurrency(amount.getCurrency()).setNumber(
                amount.getNumber().numberValue(BigDecimal.class)
                        .setScale(this.context.getInt(SCALE_KEY), this.context.get(RoundingMode.class))).create();
    }
752638
public static MonetaryAmountDecimalFormatBuilder newInstance() {
        MonetaryAmountDecimalFormatBuilder builder = new MonetaryAmountDecimalFormatBuilder();
        builder.decimalFormat = (DecimalFormat) NumberFormat.getCurrencyInstance();
        return builder;
    }
239323
function getFormatChunksFrom (rawValues, prefix) {
      getFormatChunksFrom_accumulator.length = 0;

      var rawValuesLength = rawValues.length;
      var i;

      for (i = 0; i < rawValuesLength; i++) {
        getFormatChunksFrom_accumulator.push('_' + prefix + '_' + i);
      }

      return getFormatChunksFrom_accumulator;
    }
1172066
public static SerializationFormat getInputFormat(String name) {
        for (SerializationFormat ft : Instance.serializationFormats) {
            if (ft.isAcceptedAsInput(name)) {
                return ft;
            }
        }
        return null;
    }
504821
public static String format(double amount, boolean isUseTraditional, boolean isMoneyMode) {
		final String[] numArray = isUseTraditional ? traditionalDigits : simpleDigits;

		if (amount > 99999999999999.99 || amount < -99999999999999.99) {
			throw new IllegalArgumentException("Number support only: (-99999999999999.99 ～ 99999999999999.99)！");
		}

		boolean negative = false;
		if (amount < 0) {
			negative = true;
			amount = - amount;
		}

		long temp = Math.round(amount * 100);
		int numFen = (int) (temp % 10);
		temp = temp / 10;
		int numJiao = (int) (temp % 10);
		temp = temp / 10;

		//将数字以万为单位分为多份
		int[] parts = new int[20];
		int numParts = 0;
		for (int i = 0; temp != 0; i++) {
			int part = (int) (temp % 10000);
			parts[i] = part;
			numParts++;
			temp = temp / 10000;
		}

		boolean beforeWanIsZero = true; // 标志“万”下面一级是不是 0

		String chineseStr = StrUtil.EMPTY;
		for (int i = 0; i < numParts; i++) {
			String partChinese = toChinese(parts[i], isUseTraditional);
			if (i % 2 == 0) {
				beforeWanIsZero = StrUtil.isEmpty(partChinese);
			}

			if (i != 0) {
				if (i % 2 == 0) {
					chineseStr = "亿" + chineseStr;
				} else {
					if ("".equals(partChinese) && false == beforeWanIsZero) {
						// 如果“万”对应的 part 为 0，而“万”下面一级不为 0，则不加“万”，而加“零”
						chineseStr = "零" + chineseStr;
					} else {
						if (parts[i - 1] < 1000 && parts[i - 1] > 0) {
							// 如果"万"的部分不为 0, 而"万"前面的部分小于 1000 大于 0， 则万后面应该跟“零”
							chineseStr = "零" + chineseStr;
						}
						chineseStr = "万" + chineseStr;
					}
				}
			}
			chineseStr = partChinese + chineseStr;
		}

		// 整数部分为 0, 则表达为"零"
		if (StrUtil.EMPTY.equals(chineseStr)) {
			chineseStr = numArray[0];
		}
		//负数
		if (negative) { // 整数部分不为 0
			chineseStr = "负" + chineseStr;
		}

		// 小数部分
		if (numFen != 0 || numJiao != 0) {
			if (numFen == 0) {
				chineseStr += (isMoneyMode ? "元" : "点") + numArray[numJiao] + (isMoneyMode ? "角" : "");
			} else { // “分”数不为 0
				if (numJiao == 0) {
					chineseStr += (isMoneyMode ? "元零" : "点零") + numArray[numFen] + (isMoneyMode ? "分" : "");
				} else {
					chineseStr += (isMoneyMode ? "元" : "点") + numArray[numJiao] + (isMoneyMode ? "角" : "") + numArray[numFen] + (isMoneyMode ? "分" : "");
				}
			}
		}else if(isMoneyMode) {
			//无小数部分的金额结尾
			chineseStr += "元整";
		}

		return chineseStr;

	}
1000768
public static FastMoney parse(CharSequence text, MonetaryAmountFormat formatter) {
        return from(formatter.parse(text));
    }
250543
public OkCoinDepth getFuturesDepth(CurrencyPair currencyPair, FuturesContract prompt)
      throws IOException {
    return okCoin.getFuturesDepth(
        "1", OkCoinAdapters.adaptSymbol(currencyPair), prompt.getName().toLowerCase());
  }
44557
public static String formatPluralCurrency(final Number value, final Locale locale)
    {
        return withinLocale(new Callable<String>()
        {
            public String call() throws Exception
            {
                return formatPluralCurrency(value);
            }
        }, locale);
    }
1349411
@Override
    public Double getDouble( final String     key,
                             final Double     defaultValue )
    {
        return formatDouble( key, getFormattedPropValue( key ), defaultValue );
    }
368360
public static function formatAmount(int $amount): string
    {
        if (static::$formatCurrencyUsing) {
            return call_user_func(static::$formatCurrencyUsing, $amount);
        }
        $amount = number_format($amount / 100, 2);
        if (StringHelper::startsWith($amount, '-')) {
            return '-' . static::usesCurrencySymbol() . ltrim($amount, '-');
        }

        return static::usesCurrencySymbol() . $amount;
    }
79484
function getFormattedValue(value) {
            if (valueFormatter !== null) {
                return valueFormatter(value);
            }

            let chosenValueFormatter = formatDecimalValue;

            if (!value) {
                return 0;
            }
            if (numberFormat !== null) {
                chosenValueFormatter = d3Format.format(numberFormat);
            } else if (isInteger(value)) {
                chosenValueFormatter = formatIntegerValue;
            }

            return chosenValueFormatter(value);
        }
585493
public static String formatPluralCurrency(final Number value)
    {
        DecimalFormat decf = context.get().getPluralCurrencyFormat();
        return stripZeros(decf, decf.format(value));
    }
1317494
public function formatAmount(int $amount, string $currencyCode = null, string $localeCode = null): string
    {
        return $this->helper->formatAmount($amount, $currencyCode ?? $this->baseCurrency, $localeCode ?? $this->localeContext->getLocaleCode());
    }
830649
public AmountFormatContextBuilder setMonetaryAmountFactory(
            @SuppressWarnings("rawtypes") MonetaryAmountFactory monetaryAmountBuilder) {
        Objects.requireNonNull(monetaryAmountBuilder);
        return set(MonetaryAmountFactory.class, monetaryAmountBuilder);
    }
797404
function getFormattedValue(value) {
            let format;

            if (isInteger(value)) {
                format = formatIntegerValue;
            } else {
                format = formatDecimalValue;
            }

            return format(value);
        }
353228
@Override
    public Integer getInteger( final String     key,
                               final Integer    defaultValue )
    {
        return formatInteger( key, getFormattedPropValue( key ), defaultValue );
    }