global.maplink.commons.PageResult Maven / Gradle / Ivy
The newest version!
package global.maplink.commons;
import lombok.RequiredArgsConstructor;
import java.util.List;
import static java.util.Collections.emptyList;
@RequiredArgsConstructor
public class PageResult {
public final long total;
public final List results;
public PageResult() {
this(0, emptyList());
}
public static PageResult of(long total, List results) {
return new PageResult<>(total, results);
}
}