org.knowm.xchange.cryptonit2.service.CryptonitTradeHistoryParams Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-cryptonit Show documentation
Show all versions of xchange-cryptonit Show documentation
XChange implementation for the Cryptonit Exchange
package org.knowm.xchange.cryptonit2.service;
import org.knowm.xchange.currency.CurrencyPair;
import org.knowm.xchange.service.trade.params.TradeHistoryParamCurrencyPair;
import org.knowm.xchange.service.trade.params.TradeHistoryParamOffset;
import org.knowm.xchange.service.trade.params.TradeHistoryParamPaging;
import org.knowm.xchange.service.trade.params.TradeHistoryParamsSorted;
public class CryptonitTradeHistoryParams
implements TradeHistoryParamCurrencyPair,
TradeHistoryParamsSorted,
TradeHistoryParamOffset,
TradeHistoryParamPaging {
private CurrencyPair currencyPair;
private Order order;
private Integer offset;
private Integer pageLength;
public CryptonitTradeHistoryParams(CurrencyPair currencyPair, Integer pageLength) {
this.currencyPair = currencyPair;
this.pageLength = pageLength;
}
@Override
public CurrencyPair getCurrencyPair() {
return currencyPair;
}
@Override
public void setCurrencyPair(CurrencyPair currencyPair) {
this.currencyPair = currencyPair;
}
@Override
public Order getOrder() {
return order;
}
@Override
public void setOrder(Order order) {
this.order = order;
}
@Override
public Long getOffset() {
return offset == null ? null : Long.valueOf(offset);
}
public void setOffset(Long offset) {
this.offset = offset == null ? null : offset.intValue();
}
@Override
public Integer getPageLength() {
return pageLength;
}
@Override
public void setPageLength(Integer pageLength) {
this.pageLength = pageLength;
}
@Override
public Integer getPageNumber() {
return (offset == null || pageLength == null) ? null : offset / pageLength;
}
@Override
public void setPageNumber(Integer pageNumber) {
if (pageNumber == null) {
setOffset(null);
} else if (pageLength != null) {
this.offset = pageNumber * pageLength;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy