42 lines
877 B
Java
42 lines
877 B
Java
package com.diagnose.common.result;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
|
|
public class AppPager<T> implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private List<T> list;
|
|
|
|
private boolean hasNext;
|
|
|
|
public static <T> AppPager<T> emptyPager() {
|
|
return (AppPager<T>) EMPTY_PAGER;
|
|
}
|
|
|
|
public static final AppPager EMPTY_PAGER = new AppPager<>(Collections.emptyList(), false);
|
|
|
|
public AppPager(List<T> list, boolean hasNext) {
|
|
this.list = list;
|
|
this.hasNext = hasNext;
|
|
}
|
|
|
|
public List<T> getList() {
|
|
return list;
|
|
}
|
|
|
|
public void setList(List<T> list) {
|
|
this.list = list;
|
|
}
|
|
|
|
public boolean isHasNext() {
|
|
return hasNext;
|
|
}
|
|
|
|
public void setHasNext(boolean hasNext) {
|
|
this.hasNext = hasNext;
|
|
}
|
|
}
|