org.knowm.xchange.currency.Currency.compareTo()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.knowm.xchange.currency.Currency.compareTo()方法的一些代码示例,展示了Currency.compareTo()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Currency.compareTo()方法的具体详情如下:
包路径:org.knowm.xchange.currency.Currency
类名称:Currency
方法名:compareTo

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;
}

相关文章