All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.knowm.xchange.kucoin.dto.response.Pagination Maven / Gradle / Ivy

There is a newer version: 5.2.0
Show newest version
/** Copyright 2019 Mek Global Limited. */
package org.knowm.xchange.kucoin.dto.response;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.List;
import lombok.Data;
import lombok.NoArgsConstructor;

/** Created by zicong.lu on 2018/12/21. */
@Data
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class Pagination {

  private Integer currentPage;
  private Integer pageSize;
  private Long totalNum;
  private Integer totalPage;
  private List items;

  public Pagination(Integer currentPage, Integer pageSize, Long totalNum, List items) {
    this.currentPage = currentPage;
    this.pageSize = pageSize;
    this.totalNum = totalNum;
    this.items = items;
    this.totalPage = (int) ((totalNum + (long) pageSize - 1L) / (long) pageSize);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy