Class AlbumSimplified.Builder
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.specification.AlbumSimplified.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
AlbumSimplified
Builder class for building
AlbumSimplified
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.setAlbumGroup
(AlbumGroup albumGroup) Set the album group of the album to be built.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.setExternalUrls
(ExternalUrl externalUrls) Set external URLs 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 name 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.setRestrictions
(Restrictions restrictions) Set the restrictions 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
-
setAlbumGroup
Set the album group of the album to be built.- Parameters:
albumGroup
- The album group of the album.- Returns:
- A
AlbumSimplified.Builder
.
-
setAlbumType
Set the type of the album to be built.- Parameters:
albumType
- TheAlbumType
.- Returns:
- A
AlbumSimplified.Builder
.
-
setArtists
Set the artists of the album to be built.- Parameters:
artists
-ArtistSimplified
objects.- Returns:
- A
AlbumSimplified.Builder
.
-
setAvailableMarkets
public AlbumSimplified.Builder setAvailableMarkets(com.neovisionaries.i18n.CountryCode... availableMarkets) Set the available markets of the album to be built.- Parameters:
availableMarkets
- ISO 3166-1 alpha-2 country codes.- Returns:
- A
AlbumSimplified.Builder
.
-
setExternalUrls
Set external URLs of the album to be built.- Parameters:
externalUrls
-ExternalUrl
object.- Returns:
- A
AlbumSimplified.Builder
.
-
setHref
Set href of Spotify Web API endpoint of the album to be built.- Parameters:
href
- Spotify Web API endpoint URL.- Returns:
- A
AlbumSimplified.Builder
.
-
setId
Set album ID of the album to be built.- Parameters:
id
- Spotify album ID.- Returns:
- A
AlbumSimplified.Builder
.
-
setImages
Set the cover art in different sizes of the album to be built.- Parameters:
images
-Image
objects.- Returns:
- A
AlbumSimplified.Builder
.
-
setName
Set the name of the album to be built.- Parameters:
name
- The album name.- Returns:
- A
AlbumSimplified.Builder
.
-
setReleaseDate
Set the release date of the album to be built.- Parameters:
releaseDate
- The release date of the album.- Returns:
- A
AlbumSimplified.Builder
.
-
setReleaseDatePrecision
Set the release date precision of the album to be built.- Parameters:
releaseDatePrecision
- TheReleaseDatePrecision
of the album.- Returns:
- A
AlbumSimplified.Builder
.
-
setRestrictions
Set the restrictions of the album to be built.- Parameters:
restrictions
- The restrictions of the album.- Returns:
- A
AlbumSimplified.Builder
.
-
setType
Set the type of the model object. In this case "album".- Parameters:
type
- TheModelObjectType
.- Returns:
- A
AlbumSimplified.Builder
.
-
setUri
Set the Spotify album URI of the album to be built.- Parameters:
uri
- Spotify album URI.- Returns:
- A
AlbumSimplified.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.
-