Class WpPagingQuery
java.lang.Object
io.github.evisentin.wordpress.client.domain.model.query.WpPagingQuery
Represents pagination parameters with a page number and page size.
This class is immutable and validates that both pageNumber
and pageSize are greater than zero.
-
Constructor Summary
ConstructorsConstructorDescriptionWpPagingQuery(int pageNumber, int pageSize) Creates a newWpPagingQueryinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic WpPagingQueryof(int pageNumber, int pageSize) Creates a newWpPagingQueryinstance.
-
Constructor Details
-
WpPagingQuery
public WpPagingQuery(int pageNumber, int pageSize) Creates a newWpPagingQueryinstance.- Parameters:
pageNumber- the page number (must be greater than 0)pageSize- the number of items per page (must be greater than 0)- Throws:
IllegalArgumentException- ifpageNumber < 1orpageSize < 1
-
-
Method Details
-
of
Creates a newWpPagingQueryinstance.- Parameters:
pageNumber- the page number (must be greater than 0)pageSize- the number of items per page (must be greater than 0)- Returns:
- a new
WpPagingQueryinstance
-