Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
Page<T> |
build() |
static <T> Page<T> |
buildFromAllDataCollection(java.util.Collection<T> allData,
PageRequest pageRequest)
Deprecated.
use buildFromAllDataIterable instead
|
static <T> Page<T> |
buildFromAllDataIterable(java.lang.Iterable<T> allData,
PageRequest pageRequest)
Builds Page from an iterable which contains all the available data.
|
static <T> Page<T> |
buildFromLimitPlusOneCollection(java.util.Collection<T> limitPlusOne,
PageRequest pageRequest)
Builds Page from a collection where the requested size (max) was limit + 1
If present, the last element (limit + 1) will not be returned.
|
Page.Builder<T> |
lastPage(boolean lastPage) |
Page.Builder<T> |
limit(int limit) |
Page.Builder<T> |
pageRequest(PageRequest pageRequest) |
Page.Builder<T> |
size(int size) |
Page.Builder<T> |
start(int start) |
Page.Builder<T> |
values(java.lang.Iterable<T> values) |
public Page.Builder<T> start(int start)
public Page.Builder<T> limit(int limit)
public Page.Builder<T> pageRequest(PageRequest pageRequest)
public Page.Builder<T> lastPage(boolean lastPage)
public Page.Builder<T> values(java.lang.Iterable<T> values)
public Page.Builder<T> size(int size)
public static <T> Page<T> buildFromLimitPlusOneCollection(java.util.Collection<T> limitPlusOne, PageRequest pageRequest)
limitPlusOne
- limit + 1 collectionpageRequest
- public static <T> Page<T> buildFromAllDataCollection(java.util.Collection<T> allData, PageRequest pageRequest)
public static <T> Page<T> buildFromAllDataIterable(java.lang.Iterable<T> allData, PageRequest pageRequest)
allData
- pageRequest
-