Package com.onwbp.adaptation
Class RequestPagination.Page
- java.lang.Object
-
- com.onwbp.adaptation.RequestPagination.Page
-
- Enclosing class:
- RequestPagination
public static final class RequestPagination.Page extends Object
Represents a page over a request.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Adaptation>
getRows()
Returns the rows of the current page, nevernull
.int
getSize()
Returns the actual size of this page (the number of rows).boolean
hasNextPage()
Returnsfalse
if and only if we are on the last page.boolean
hasPreviousPage()
Returnsfalse
if and only if we are on the first page.boolean
isEmpty()
Returns whether this page is empty.String
toString()
-
-
-
Method Detail
-
getSize
public int getSize()
Returns the actual size of this page (the number of rows).- See Also:
RequestPagination.setPageSize(int)
-
isEmpty
public boolean isEmpty()
Returns whether this page is empty.- See Also:
RequestPagination.setPageSize(int)
-
getRows
public List<Adaptation> getRows()
Returns the rows of the current page, nevernull
.The returned
List
is read only and has a size that is equal or less that the one specified by the methodRequestPagination.setPageSize(int)
.
-
hasPreviousPage
public boolean hasPreviousPage()
Returnsfalse
if and only if we are on the first page.
-
hasNextPage
public boolean hasNextPage()
Returnsfalse
if and only if we are on the last page.
-
-