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 buildingPaginginstances.
-
-
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(java.lang.String href)The href setter.Paging.Builder<T>setItems(T[] items)The items setter.Paging.Builder<T>setLimit(java.lang.Integer limit)The request limit setter.Paging.Builder<T>setNext(java.lang.String next)The next URL setter.Paging.Builder<T>setOffset(java.lang.Integer offset)The offset setter.Paging.Builder<T>setPrevious(java.lang.String previous)The previous URL setter.Paging.Builder<T>setTotal(java.lang.Integer total)The total amount setter.
-
-
-
Method Detail
-
setHref
public Paging.Builder<T> setHref(java.lang.String href)
The href setter.- Parameters:
href- A link to the Web API endpoint returning the full result of the request.- Returns:
- A
Paging.Builder.
-
setItems
public Paging.Builder<T> setItems(T[] items)
The items setter.- Parameters:
items- A page of items.- Returns:
- A
Paging.Builder.
-
setLimit
public Paging.Builder<T> setLimit(java.lang.Integer limit)
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
public Paging.Builder<T> setNext(java.lang.String next)
The next URL setter.- Parameters:
next- URL to the next page of items. (nullif none)- Returns:
- A
Paging.Builder.
-
setOffset
public Paging.Builder<T> setOffset(java.lang.Integer offset)
The offset setter.- Parameters:
offset- The offset of the items returned (as set in the query or by default).- Returns:
- A
Paging.Builder.
-
setPrevious
public Paging.Builder<T> setPrevious(java.lang.String previous)
The previous URL setter.- Parameters:
previous- URL to the previous page of items. (nullif none)- Returns:
- A
Paging.Builder.
-
setTotal
public Paging.Builder<T> setTotal(java.lang.Integer total)
The total amount setter.- Parameters:
total- The total number of items available to return.- Returns:
- A
Paging.Builder.
-
build
public Paging<T> 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.
-
-