Interface Page<Entity>
- Type Parameters:
Entity
-
- All Superinterfaces:
Iterable<Entity>
- All Known Implementing Classes:
PageImpl
A page is a sub-list of a list of objects. It allows gain information about the position of it in the containing
entire list.
-
Method Summary
Modifier and TypeMethodDescriptionReturn container content.int
Returns the number of elements on the page.int
Returns the number of the current page.long
Returns the total amount of elements.int
Returns the number of total pages.boolean
Returns if there is a content exists.boolean
hasNext()
Returns if there is a next page exists.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getPageNumber
int getPageNumber()Returns the number of the current page. Is always non-negative.- Returns:
- the number of the current page.
-
getItemsNumber
int getItemsNumber()Returns the number of elements on the page.- Returns:
- the number of elements on the page.
-
getTotalPages
int getTotalPages()Returns the number of total pages.- Returns:
- the number of total pages
-
getTotalItems
long getTotalItems()Returns the total amount of elements.- Returns:
- the total amount of elements
-
hasNext
boolean hasNext()Returns if there is a next page exists.- Returns:
- true if there is a next page exists, otherwise false.
-
getContent
Return container content.- Returns:
- container content
-
hasContent
boolean hasContent()Returns if there is a content exists.- Returns:
- true if there is a content exists, otherwise false
-