项目作者: Fenscode

项目描述 :
Gets the set of available currencies. The returned set of currencies contains all of the available currencies, which may include currencies that represent obsolete ISO 4217 codes
高级语言: Java
项目地址: git://github.com/Fenscode/FindCurrencyExa.git
创建时间: 2017-10-31T06:31:25Z
项目社区:https://github.com/Fenscode/FindCurrencyExa

开源协议:Apache License 2.0

下载


FindCurrencyExa

Search currency information by Country, Country code,ISO3 Country code and Currency code

Gets the set of available currencies. The returned set of currencies contains all of the available currencies, which may include currencies that represent obsolete ISO 4217 codes

https://goo.gl/cYD1Gm

Java provide a Currency utility class, which is returns list of currency information of all countries.

e.g.

  1. import java.util.Currency;
  2. *******************************
  3. Set<Currency> availableCurrenciesSet;
  4. List<Currency> currencyList;
  5. availableCurrenciesSet = Currency.getAvailableCurrencies();
  6. currencyList = new ArrayList<>(availableCurrenciesSet);
  7. for (int i = 0; i < currencyList.size(); i++) {
  8. if (currencyList.get(i).getCurrencyCode().equalsIgnoreCase(currencyCode)) {
  9. tv_currencySymbol.setText(currencyList.get(i).getSymbol());
  10. tv_currencyDisplayName.setText("Display Name: ".concat(currencyList.get(i).getDisplayName()));
  11. tv_currencyCode.setText("Currency Code: ".concat(currencyList.get(i).getCurrencyCode()));
  12. tv_fractionDigits.setText("FractionDigits:".concat(String.valueOf(currencyList.get(i).getDefaultFractionDigits())));
  13. tv_numericCode.setText("Numeric Code: ".concat(String.valueOf(currencyList.get(i).getNumericCode())));
  14. }
  15. }
  16. ************************