Class Paging.Builder<T>
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.specification.Paging.Builder<T>
- Type Parameters:
T
- The type of the objects contained in a paging object.
- All Implemented Interfaces:
IModelObject.Builder
Builder class for building
Paging
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.The href setter.The items setter.The request limit setter.The next URL setter.The offset setter.setPrevious
(String previous) The previous 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
Paging.Builder
.
-
setItems
The items setter.- Parameters:
items
- A page of items.- Returns:
- A
Paging.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
Paging.Builder
.
-
setNext
The next URL setter.- Parameters:
next
- URL to the next page of items. (null
if none)- Returns:
- A
Paging.Builder
.
-
setOffset
The offset setter.- Parameters:
offset
- The offset of the items returned (as set in the query or by default).- Returns:
- A
Paging.Builder
.
-
setPrevious
The previous URL setter.- Parameters:
previous
- URL to the previous page of items. (null
if none)- Returns:
- A
Paging.Builder
.
-
setTotal
The total amount setter.- Parameters:
total
- The total number of items available to return.- Returns:
- A
Paging.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.
-