新增empty

This commit is contained in:
zhouhao
2017-07-12 21:30:24 +08:00
parent 15d42b77b1
commit d85cf4a39d

View File

@@ -22,11 +22,17 @@ package org.hswebframework.web.commons.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Collections;
import java.util.List;
@ApiModel(description = "分页结果")
public class PagerResult<E> implements Entity {
private static final long serialVersionUID = -6171751136953308027L;
public static <E> PagerResult<E> empty(){
return new PagerResult<>(0, Collections.emptyList());
}
private int total;
private List<E> data;