本文整理了Java中org.knowm.xchange.currency.Currency.getAvailableCurrencyCodes()
方法的一些代码示例,展示了Currency.getAvailableCurrencyCodes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Currency.getAvailableCurrencyCodes()
方法的具体详情如下:
包路径:org.knowm.xchange.currency.Currency
类名称:Currency
方法名:getAvailableCurrencyCodes
[英]Gets the set of available currency codes.
[中]获取可用的货币代码集。
代码示例来源:origin: knowm/XChange
@JsonAnySetter
public void setDynamicProperty(String name, Object value) {
// here we handle dynamically the amounts of base and counter curency plus the rate (price),
// which contains the underscore, ie "btc_usd
final Set<String> ccyCodeList = Currency.getAvailableCurrencyCodes();
String[] nameArr = name.toUpperCase().split("_");
String name1 = nameArr[0];
if (nameArr.length == 2) {
String name2 = nameArr[1];
if (ccyCodeList.contains(name1) && ccyCodeList.contains(name2)) {
base = name1;
counter = name2;
price = new BigDecimal(value.toString());
}
} else if (nameArr.length == 1) {
if (ccyCodeList.contains(name1)) {
amounts.put(name1, new BigDecimal(value.toString()));
}
}
}
代码示例来源:origin: knowm/XChange
@JsonAnySetter
public void setDynamicProperty(String name, Object value) {
// here we handle dynamically the amounts of base and counter curency plus the rate (price),
// which contains the underscore, ie "btc_usd
final Set<String> ccyCodeList = Currency.getAvailableCurrencyCodes();
String[] nameArr = name.toUpperCase().split("_");
String name1 = nameArr[0];
if (nameArr.length == 2) {
String name2 = nameArr[1];
if (ccyCodeList.contains(name1) && ccyCodeList.contains(name2)) {
base = name1;
counter = name2;
price = new BigDecimal(value.toString());
}
} else if (nameArr.length == 1) {
if (ccyCodeList.contains(name1)) {
amounts.put(name1, new BigDecimal(value.toString()));
}
}
}
代码示例来源:origin: org.knowm.xchange/xchange-bitstamp
@JsonAnySetter
public void setDynamicProperty(String name, Object value) {
// here we handle dynamically the amounts of base and counter curency plus the rate (price),
// which contains the underscore, ie "btc_usd
final Set<String> ccyCodeList = Currency.getAvailableCurrencyCodes();
String[] nameArr = name.toUpperCase().split("_");
String name1 = nameArr[0];
if (nameArr.length == 2) {
String name2 = nameArr[1];
if (ccyCodeList.contains(name1) && ccyCodeList.contains(name2)) {
base = name1;
counter = name2;
price = new BigDecimal(value.toString());
}
} else if (nameArr.length == 1) {
if (ccyCodeList.contains(name1)) {
amounts.put(name1, new BigDecimal(value.toString()));
}
}
}
内容来源于网络,如有侵权,请联系作者删除!