public class OneSubsetOneSetPagingCalculator extends DefaultPagingCalculator
PagingCalculator.Sizeable
DEFAULT_PAGE_SIZE
Constructor and Description |
---|
OneSubsetOneSetPagingCalculator(PagingCalculator.Sizeable firstSet,
PagingCalculator.Sizeable secondSet,
int maxPageSize) |
OneSubsetOneSetPagingCalculator(PagingCalculator.Sizeable firstSet,
PagingCalculator.Sizeable secondSet,
int maxPageSize,
long currentPage) |
Modifier and Type | Method and Description |
---|---|
long |
getFirstSetHowMany()
Returns the number of elements of the current page into the first set.
|
long |
getFirstSetInitialIndex()
Returns the index of the first element in the page which is available
into the first set, if the current page has elements on it.
|
long |
getFirstSetSize()
Returns the size of the first set.
|
long |
getSecondSetHowMany()
Returns the number of elements of the current page into the second set.
|
long |
getSecondSetInitialIndex()
Returns the index of the first element in the page which is available
into the second set, if the current page has elements on it.
|
long |
getSecondSetSize()
Returns the size of the second set.
|
long |
getTotalSize()
Returns the number of elements of the entire set of data.
|
protected boolean |
hasCurrentPageAllValuesInFirstSet()
Returns if the current page has all its values into the first set.
|
boolean |
hasCurrentPageAnyValuesInFirstSet()
Returns if the current page has any of its values into the first set.
|
boolean |
hasCurrentPageAnyValuesInSecondSet()
Returns if the current page has any of its values into the second set.
|
getCurrentPage, getCurrentPageSize, getInitialIndex, getLastIndex, getMaxPageSize, getNumPages, setCurrentPage, setMaxPageSize
public OneSubsetOneSetPagingCalculator(PagingCalculator.Sizeable firstSet, PagingCalculator.Sizeable secondSet, int maxPageSize)
firstSet
- the first set of elements to calculate pagination forsecondSet
- the second set of elements to calculate pagination forAbstractPagingCalculator#AbstractPagingCalculator(int).
public OneSubsetOneSetPagingCalculator(PagingCalculator.Sizeable firstSet, PagingCalculator.Sizeable secondSet, int maxPageSize, long currentPage)
firstSet
- the first set of elements to calculate pagination forsecondSet
- the second set of elements to calculate pagination forAbstractPagingCalculator#AbstractPagingCalculator(int, long).
public long getTotalSize()
PagingCalculator
getTotalSize
in interface PagingCalculator
getTotalSize
in class DefaultPagingCalculator
public long getFirstSetSize()
public long getSecondSetSize()
public long getFirstSetInitialIndex()
public long getSecondSetInitialIndex()
public long getFirstSetHowMany()
public long getSecondSetHowMany()
protected boolean hasCurrentPageAllValuesInFirstSet()
public boolean hasCurrentPageAnyValuesInFirstSet()
public boolean hasCurrentPageAnyValuesInSecondSet()