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

com.kucoin.sdk.rest.response.Pagination Maven / Gradle / Ivy

The newest version!
/**
 * Copyright 2019 Mek Global Limited.
 */

package com.kucoin.sdk.rest.response;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

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