本文整理匯總了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);
}