Interface ContainerPagedAccess<T>
- Type Parameters:
T
- Type of the container entries.
public interface ContainerPagedAccess<T>
An interface which represents paged access to a
Container
.-
Method Summary
-
Method Details
-
size
int size()Total amount of entries in this container.This value should change when the container size changes. For example in case of addition or removal of an entry.
- Returns:
- the current size of the container
-
pages
default int pages(int size) Amount of pages.The ceiled value of a division of
size()
and the input parameter.- Parameters:
size
- size of a page- Returns:
- the amount of pages
-
page
Get a page from this container.A page is considered a subset of all saved entries. The order of the entries should be fixed and ideally defined by being ordered by some named identifier.
- Parameters:
page
- page index. Zero basedsize
- size of the page content- Returns:
- a list of entries of this page.
-