public interface Pageable
Modifier and Type | Method and Description |
---|---|
static Pageable |
create(int page,
int size)
Creates a new
Pageable . |
default <T extends Pageable> |
first()
Returns the
Pageable requesting the first page. |
<T extends Pageable> |
from(int page,
int size) |
default int |
getOffset()
Returns the offset to be taken according to the underlying page and page size.
|
int |
getPageNumber()
Returns the page to be returned.
|
int |
getPageSize()
Returns the number of items to be returned.
|
default boolean |
hasPrevious()
Returns whether there's a previous
Pageable we can access from the current one. |
default <T extends Pageable> |
next()
|
default <T extends Pageable> |
previousOrFirst()
|
int getPageNumber()
int getPageSize()
default int getOffset()
<T extends Pageable> T from(int page, int size)
default <T extends Pageable> T next()
default <T extends Pageable> T previousOrFirst()
default <T extends Pageable> T first()
Pageable
requesting the first page.default boolean hasPrevious()
Pageable
we can access from the current one. Will return
false in case the current Pageable
already refers to the first page.Copyright © 2021. All rights reserved.