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

com.quincy.sdk.Pagination Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package com.quincy.sdk;

import lombok.Data;

@Data
public class Pagination {
	private Integer count;
	private Object data;
	private Integer from;
	private Integer to;
	private Integer pages;
	private Integer page;

	public Pagination(Integer count, Integer page, Integer size) {
		this.count = count;
		this.page = page;
		this.from = size*(page-1)+1;
		this.to = this.from+size-1;
		this.pages = count/size;
		int remainder = count%size;
		if(remainder>0)
			this.pages++;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy