当前位置: 首页>>代码示例>>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;未经允许,请勿转载。