Package de.sfuhrm.radiobrowser4j
Klasse Paging
java.lang.Object
de.sfuhrm.radiobrowser4j.Parameter
de.sfuhrm.radiobrowser4j.Paging
Immutable paging configuration.
The paging is used to address a sub list that can be retrieved in
one logical page. This enables the client to itereate through a
long list without needing to store the whole result in memory.
- Autor:
- Stephan Fuhrmann
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final PagingA default start page with offset 0 and limit 64. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected voidApplies the parameters stored in this instance to the given request parameters.static Pagingat(int offset, int limit) Creates a new paging at the given offset and limit.next()Address the next paging.previous()Address the previous paging.
-
Felddetails
-
DEFAULT_START
A default start page with offset 0 and limit 64.
-
-
Methodendetails
-
at
Creates a new paging at the given offset and limit.- Parameter:
offset- the positive offset of the page.limit- the maximum number of entries.- Gibt zurück:
- the paging instance created.
-
previous
Address the previous paging. Will never go beyond offset 0.- Gibt zurück:
- returns the paging at
offset - limitand keeps thelimit. Will return0if going beyond offset 0.
-
next
Address the next paging.- Gibt zurück:
- returns the paging at
offset + limitand keeps thelimit.
-
apply
Applies the parameters stored in this instance to the given request parameters.- Parameter:
requestParams- the parameters to apply the instance content to.
-