Class Paging.Builder<T>
java.lang.Object
com.wrapper.spotify.model_objects.AbstractModelObject.Builder
com.wrapper.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
public static final class Paging.Builder<T> extends AbstractModelObject.Builder
Builder class for building
Paging instances.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description Paging<T>build()Build a model object with the information set in the builder object.Paging.Builder<T>setHref(String href)The href setter.Paging.Builder<T>setItems(T[] items)The items setter.Paging.Builder<T>setLimit(Integer limit)The request limit setter.Paging.Builder<T>setNext(String next)The next URL setter.Paging.Builder<T>setOffset(Integer offset)The offset setter.Paging.Builder<T>setPrevious(String previous)The previous URL setter.Paging.Builder<T>setTotal(Integer total)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. (nullif 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. (nullif 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.BuilderBuild 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.
-