pers.clare.hisql.page.Next Maven / Gradle / Ivy
The newest version!
package pers.clare.hisql.page;
import java.util.Collections;
import java.util.List;
@SuppressWarnings("unused")
public class Next {
private final int page;
private final int size;
private final List records;
public Next(int page, int size, List records) {
this.page = page;
this.size = size;
this.records = records;
}
public static Next of(int page, int size, List records) {
return new Next<>(page, size, records);
}
public static Next empty(Pagination pagination) {
return new Next<>(pagination.getPage(), pagination.getSize(), Collections.emptyList());
}
public int getPage() {
return page;
}
public int getSize() {
return size;
}
public List getRecords() {
return records;
}
}