本文整理汇总了Java中com.ripple.core.coretypes.Issue.fromString方法的典型用法代码示例。如果您正苦于以下问题:Java Issue.fromString方法的具体用法?Java Issue.fromString怎么用?Java Issue.fromString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ripple.core.coretypes.Issue
的用法示例。
在下文中一共展示了Issue.fromString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseExchanges
import com.ripple.core.coretypes.Issue; //导入方法依赖的package包/类
public static List<Pair<Issue, Issue>> parseExchanges(String exchanges) {
String[] e = exchanges.split(",");
List<Pair<Issue, Issue>> listPair = new ArrayList<>();
for (int i = 0; i < e.length; i++) {
if (!e[i].startsWith("#")) {
String[] paths = e[i].split("/");
Issue issue1 = Issue.fromString(paths[0] + "/" + paths[1]);
Issue issue2 = Issue.fromString(paths[2] + "/" + paths[3]);
Pair<Issue, Issue> pair = new Pair<Issue, Issue>(issue1, issue2);
listPair.add(pair);
}
}
return listPair;
}
示例2: permutation
import com.ripple.core.coretypes.Issue; //导入方法依赖的package包/类
public HashMap<Pair<Issue, Issue>, double[]> permutation(String[] currencies) {
HashMap<Pair<Issue, Issue>, double[]> result = new HashMap<>();
for (int i = 0; i < currencies.length; i++) {
for (int j = 0; j < currencies.length; j++) {
if (!currencies[i].equals(currencies[j])) {
Issue getIssue = Issue.fromString(currencies[i]);
Issue payIssue = Issue.fromString(currencies[j]);
result.put(new Pair<Issue, Issue>(getIssue, payIssue), new double[0]);
}
}
}
return result;
}
示例3: refreshSetup
import com.ripple.core.coretypes.Issue; //导入方法依赖的package包/类
private void refreshSetup() {
this.amount = avalancheSetup().getBaseAmount();
this.pathTo = avalancheSetup().getPathTo();
this.pathFrom = avalancheSetup().getPathFrom();
this.baseAsset = Issue.fromString(avalancheSetup().getBaseAsset());
}
示例4: refreshSetup
import com.ripple.core.coretypes.Issue; //导入方法依赖的package包/类
private void refreshSetup() {
this.getIssue = Issue.fromString(avalancheSetup().getBaseAsset());
this.payIssue = Issue.fromString(avalancheSetup().getCounterAsset());
this.offerBook = new OfferBook(getIssue, payIssue);
publish();
}
示例5: parseIssueFromBookOffer
import com.ripple.core.coretypes.Issue; //导入方法依赖的package包/类
private Issue parseIssueFromBookOffer(JSONObject jsonObject) throws JSONException {
String currency = jsonObject.getString("currency");
if (!Issue.XRP.toString().equals(currency)) {
return Issue.fromString(currency.concat("/").concat(jsonObject.getString("issuer")));
}
return Issue.fromString(currency);
}