Class PagingCursorbased.Builder<T>
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.specification.PagingCursorbased.Builder<T>
- Type Parameters:
T
- The type of the objects contained in a paging object.
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
PagingCursorbased<T>
Builder class for building
PagingCursorbased
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.setCursors
(Cursor... cursors) The cursor setter.The href setter.The items setter.The request limit setter.The next URL setter.The total amount setter.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setHref
The href setter.- Parameters:
href
- A link to the Web API endpoint returning the full result of the request.- Returns:
- A
PagingCursorbased.Builder
.
-
setItems
The items setter.- Parameters:
items
- A page of items.- Returns:
- A
PagingCursorbased.Builder
.
-
setLimit
The request limit setter.- Parameters:
limit
- The maximum number of items in the response (as set in the query or by default).- Returns:
- A
PagingCursorbased.Builder
.
-
setNext
The next URL setter.- Parameters:
next
- URL to the next page of items. (null
if none)- Returns:
- A
PagingCursorbased.Builder
.
-
setCursors
The cursor setter.- Parameters:
cursors
- The cursors used to find the next set of items.- Returns:
- A
PagingCursorbased.Builder
.
-
setTotal
The total amount setter.- Parameters:
total
- The total number of items available to return.- Returns:
- A
PagingCursorbased.Builder
.
-
build
Description copied from interface:IModelObject.Builder
Build a model object with the information set in the builder object.
The type of the model object and its methods depend on its corresponding implementation.- Returns:
- A model object.
-