Class Album.Builder
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.specification.Album.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
Album
Builder class for building
Album
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.setAlbumType
(AlbumType albumType) Set the type of the album to be built.setArtists
(ArtistSimplified... artists) Set the artists of the album to be built.setAvailableMarkets
(com.neovisionaries.i18n.CountryCode... availableMarkets) Set the available markets of the album to be built.setCopyrights
(Copyright... copyrights) Set the copyrights of the album to be built.setExternalIds
(ExternalId externalIds) Set the external IDs of the album to be built.setExternalUrls
(ExternalUrl externalUrls) Set external URLs of the album to be built.Set the genres of the album to be built.Set href of Spotify Web API endpoint of the album to be built.Set album ID of the album to be built.Set the cover art in different sizes of the album to be built.Set the label of the album to be built.Set the name of the album to be built.setPopularity
(Integer popularity) Set the popularity of the album to be built.setReleaseDate
(String releaseDate) Set the release date of the album to be built.setReleaseDatePrecision
(ReleaseDatePrecision releaseDatePrecision) Set the release date precision of the album to be built.setTracks
(Paging<TrackSimplified> tracks) Set the tracks of the album to be built.setType
(ModelObjectType type) Set the type of the model object.Set the Spotify album URI of the album to be built.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setAlbumType
Set the type of the album to be built.- Parameters:
albumType
- TheAlbumType
.- Returns:
- A
Album.Builder
.
-
setArtists
Set the artists of the album to be built.- Parameters:
artists
-ArtistSimplified
objects.- Returns:
- A
Album.Builder
.
-
setAvailableMarkets
Set the available markets of the album to be built.- Parameters:
availableMarkets
- ISO 3166-1 alpha-2 country codes.- Returns:
- A
Album.Builder
.
-
setCopyrights
Set the copyrights of the album to be built.- Parameters:
copyrights
-Copyright
objects.- Returns:
- A
Album.Builder
.
-
setExternalIds
Set the external IDs of the album to be built.- Parameters:
externalIds
-ExternalId
object.- Returns:
- A
Album.Builder
.
-
setExternalUrls
Set external URLs of the album to be built.- Parameters:
externalUrls
-ExternalUrl
object.- Returns:
- A
Album.Builder
.
-
setGenres
Set the genres of the album to be built.- Parameters:
genres
- Genre names.- Returns:
- A
Album.Builder
.
-
setHref
Set href of Spotify Web API endpoint of the album to be built.- Parameters:
href
- Spotify Web API endpoint URL.- Returns:
- A
Album.Builder
.
-
setId
Set album ID of the album to be built.- Parameters:
id
- Spotify album ID.- Returns:
- A
Album.Builder
.
-
setImages
Set the cover art in different sizes of the album to be built.- Parameters:
images
-Image
objects.- Returns:
- A
Album.Builder
.
-
setLabel
Set the label of the album to be built.- Parameters:
label
- The album label.- Returns:
- A
Album.Builder
.
-
setName
Set the name of the album to be built.- Parameters:
name
- The album name.- Returns:
- A
Album.Builder
.
-
setPopularity
Set the popularity of the album to be built.- Parameters:
popularity
- The popularity of the album between 0 and 100.- Returns:
- A
Album.Builder
.
-
setReleaseDate
Set the release date of the album to be built.- Parameters:
releaseDate
- The release date of the album.- Returns:
- A
Album.Builder
.
-
setReleaseDatePrecision
Set the release date precision of the album to be built.- Parameters:
releaseDatePrecision
- TheReleaseDatePrecision
of the album.- Returns:
- A
Album.Builder
.
-
setTracks
Set the tracks of the album to be built.- Parameters:
tracks
- APaging
object containingTrackSimplified
objects.- Returns:
- A
Album.Builder
.
-
setType
Set the type of the model object. In this case "album".- Parameters:
type
- TheModelObjectType
.- Returns:
- A
Album.Builder
.
-
setUri
Set the Spotify album URI of the album to be built.- Parameters:
uri
- Spotify album URI.- Returns:
- A
Album.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.
-