public abstract class AbstractPageRequest extends Object implements Pageable, Serializable
Pageable
.Constructor and Description |
---|
AbstractPageRequest(int page,
int size)
Creates a new
AbstractPageRequest . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
abstract Pageable |
first()
Returns the
Pageable requesting the first page. |
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.
|
int |
hashCode() |
boolean |
hasPrevious()
Returns whether there's a previous
Pageable we can access from the current one. |
abstract Pageable |
next()
|
abstract Pageable |
previous()
|
Pageable |
previousOrFirst()
|
public AbstractPageRequest(int page, int size)
AbstractPageRequest
. Pages are zero indexed, thus providing 0 for page
will return
the first page.page
- must not be less than zero.size
- must not be less than one.public int getPageSize()
Pageable
getPageSize
in interface Pageable
public int getPageNumber()
Pageable
getPageNumber
in interface Pageable
public int getOffset()
Pageable
public boolean hasPrevious()
Pageable
Pageable
we can access from the current one. Will return
false in case the current Pageable
already refers to the first page.hasPrevious
in interface Pageable
public Pageable previousOrFirst()
Pageable
previousOrFirst
in interface Pageable
public abstract Pageable previous()
public abstract Pageable first()
Pageable
Pageable
requesting the first page.Copyright © 2011-2016–2016 Pivotal Software, Inc.. All rights reserved.