Class Artist.Builder
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.specification.Artist.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
Artist
Builder class for building
Artist
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 artist to be built.setFollowers
(Followers followers) Set the followers object of the artist to be built.Set the genres of the artist to be built.Set href of Spotify Web API endpoint of the artist to be built.Set artist ID of the artist to be built.Set the images of the artist to be built, like the header image.Set the name of the artist to be built.setPopularity
(Integer popularity) Set the popularity of the artist to be built.setType
(ModelObjectType type) Set the type of the model object.Set the Spotify artist URI of the artist to be built.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setExternalUrls
Set external URLs of the artist to be built.- Parameters:
externalUrls
-ExternalUrl
object.- Returns:
- A
Artist.Builder
.
-
setFollowers
Set the followers object of the artist to be built.- Parameters:
followers
- AFollowers
object.- Returns:
- A
Artist.Builder
.
-
setGenres
Set the genres of the artist to be built.- Parameters:
genres
- Genre names.- Returns:
- A
Artist.Builder
.
-
setHref
Set href of Spotify Web API endpoint of the artist to be built.- Parameters:
href
- Spotify Web API endpoint URL.- Returns:
- A
Artist.Builder
.
-
setId
Set artist ID of the artist to be built.- Parameters:
id
- Spotify artist ID.- Returns:
- A
Artist.Builder
.
-
setImages
Set the images of the artist to be built, like the header image.- Parameters:
images
-Image
objects.- Returns:
- A
Artist.Builder
.
-
setName
Set the name of the artist to be built.- Parameters:
name
- The artist name.- Returns:
- A
Artist.Builder
.
-
setPopularity
Set the popularity of the artist to be built.- Parameters:
popularity
- The popularity of the artist between 0 and 100.- Returns:
- A
Artist.Builder
.
-
setType
Set the type of the model object. In this case "artist".- Parameters:
type
- TheModelObjectType
.- Returns:
- A
Artist.Builder
.
-
setUri
Set the Spotify artist URI of the artist to be built.- Parameters:
uri
- Spotify artist URI.- Returns:
- A
Artist.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.
-