當前位置: 首頁>>代碼示例>>Java>>正文


Java Issue.fromString方法代碼示例

本文整理匯總了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;
}
 
開發者ID:mileschet,項目名稱:ripple-marketmaker,代碼行數:15,代碼來源:RippleArbitragerPathfindPublisher.java

示例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;
}
 
開發者ID:mileschet,項目名稱:ripple-marketmaker,代碼行數:15,代碼來源:RippleArbitrager.java

示例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());
}
 
開發者ID:mileschet,項目名稱:ripple-marketmaker,代碼行數:7,代碼來源:RipplePathfindPublisher.java

示例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();
}
 
開發者ID:mileschet,項目名稱:ripple-marketmaker,代碼行數:7,代碼來源:RippleOfferBookPublisher.java

示例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);

    }
 
開發者ID:mileschet,項目名稱:ripple-marketmaker,代碼行數:11,代碼來源:OfferBook.java


注:本文中的com.ripple.core.coretypes.Issue.fromString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。