本文整理了Java中org.knowm.xchange.currency.Currency.compareTo()
方法的一些代码示例,展示了Currency.compareTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Currency.compareTo()
方法的具体详情如下:
包路径:org.knowm.xchange.currency.Currency
类名称:Currency
方法名:compareTo
暂无
代码示例来源:origin: knowm/XChange
@Override
public int compareTo(CurrencyPair o) {
return (base.compareTo(o.base) << 16) + counter.compareTo(o.counter);
}
}
代码示例来源:origin: knowm/XChange
@Override
public int compareTo(BitmexContract o) {
return (pair.base.compareTo(o.pair.base) << 16)
+ pair.counter.compareTo(o.pair.counter)
+ prompt.compareTo(o.prompt);
}
}
代码示例来源:origin: knowm/XChange
@Override
public int compareTo(Balance other) {
int comparison = currency.compareTo(other.currency);
if (comparison != 0) return comparison;
comparison = total.compareTo(other.total);
if (comparison != 0) return comparison;
comparison = available.compareTo(other.available);
if (comparison != 0) return comparison;
comparison = frozen.compareTo(other.frozen);
if (comparison != 0) return comparison;
comparison = borrowed.compareTo(other.borrowed);
if (comparison != 0) return comparison;
comparison = loaned.compareTo(other.loaned);
if (comparison != 0) return comparison;
comparison = withdrawing.compareTo(other.withdrawing);
if (comparison != 0) return comparison;
comparison = depositing.compareTo(other.depositing);
return comparison;
}
代码示例来源:origin: org.knowm.xchange/xchange-core
@Override
public int compareTo(CurrencyPair o) {
return (base.compareTo(o.base) << 16) + counter.compareTo(o.counter);
}
}
代码示例来源:origin: org.knowm.xchange/xchange-bitmex
@Override
public int compareTo(BitmexContract o) {
return (pair.base.compareTo(o.pair.base) << 16)
+ pair.counter.compareTo(o.pair.counter)
+ prompt.compareTo(o.prompt);
}
}
代码示例来源:origin: org.knowm.xchange/xchange-core
@Override
public int compareTo(Balance other) {
int comparison = currency.compareTo(other.currency);
if (comparison != 0) return comparison;
comparison = total.compareTo(other.total);
if (comparison != 0) return comparison;
comparison = available.compareTo(other.available);
if (comparison != 0) return comparison;
comparison = frozen.compareTo(other.frozen);
if (comparison != 0) return comparison;
comparison = borrowed.compareTo(other.borrowed);
if (comparison != 0) return comparison;
comparison = loaned.compareTo(other.loaned);
if (comparison != 0) return comparison;
comparison = withdrawing.compareTo(other.withdrawing);
if (comparison != 0) return comparison;
comparison = depositing.compareTo(other.depositing);
return comparison;
}
内容来源于网络,如有侵权,请联系作者删除!