Class TrackLink.Builder
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.specification.TrackLink.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
TrackLink
Builder class for building
TrackLink
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.setExternalUrls
(ExternalUrl externalUrls) Set external URLs of the track to be built.Set href of Spotify Web API endpoint of the track to be built.Set the Spotify ID of the track to be built.setType
(ModelObjectType type) Set the type of the model object.Set the Spotify URI of the track to be built.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setExternalUrls
Set external URLs of the track to be built.- Parameters:
externalUrls
- Known external URLs for this track.- Returns:
- A
TrackLink.Builder
.
-
setHref
Set href of Spotify Web API endpoint of the track to be built.- Parameters:
href
- A link to the Web API endpoint providing full details of the track.- Returns:
- A
TrackLink.Builder
.
-
setId
Set the Spotify ID of the track to be built.- Parameters:
id
- A Spotify track ID.- Returns:
- A
TrackLink.Builder
.
-
setType
Set the type of the model object. In this case "track".- Parameters:
type
- The object type: "track".- Returns:
- A
TrackLink.Builder
.
-
setUri
Set the Spotify URI of the track to be built.- Parameters:
uri
- The Spotify URI for the track.- Returns:
- A
TrackLink.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.
-