T - The entity typepublic final class PageData<T>
extends java.lang.Object
| Constructor and Description |
|---|
PageData(java.util.List<T> content,
int page,
int size,
long total)
Create page data
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<T> |
getContent()
Returns data content
|
int |
getPage()
Returns page index
|
long |
getPages()
Returns total pages count
|
int |
getSize()
Returns page size
|
long |
getTotal()
Returns total count of data content
|
boolean |
isFirst() |
boolean |
isLast() |
<S> PageData<S> |
map(java.util.function.Function<T,S> fun)
Use this method, translate objects to another type objects
|
public PageData(java.util.List<T> content, int page, int size, long total)
content - Data contentpage - Page indexsize - Page sizetotal - Total countpublic <S> PageData<S> map(java.util.function.Function<T,S> fun)
S - Target object classfun - Translator functionpublic java.util.List<T> getContent()
public int getPage()
public int getSize()
public long getPages()
public long getTotal()
public boolean isFirst()
truepublic boolean isLast()
trueCopyright © 2019. All Rights Reserved.