Class Album.Builder
- java.lang.Object
-
- com.wrapper.spotify.model_objects.AbstractModelObject.Builder
-
- com.wrapper.spotify.model_objects.specification.Album.Builder
-
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
- Album
public static final class Album.Builder extends AbstractModelObject.Builder
Builder class for buildingAlbuminstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Albumbuild()Build a model object with the information set in the builder object.Album.BuildersetAlbumType(AlbumType albumType)Set the type of the album to be built.Album.BuildersetArtists(ArtistSimplified... artists)Set the artists of the album to be built.Album.BuildersetAvailableMarkets(com.neovisionaries.i18n.CountryCode... availableMarkets)Set the available markets of the album to be built.Album.BuildersetCopyrights(Copyright... copyrights)Set the copyrights of the album to be built.Album.BuildersetExternalIds(ExternalId externalIds)Set the external IDs of the album to be built.Album.BuildersetExternalUrls(ExternalUrl externalUrls)Set external URLs of the album to be built.Album.BuildersetGenres(String... genres)Set the genres of the album to be built.Album.BuildersetHref(String href)Set href of Spotify Web API endpoint of the album to be built.Album.BuildersetId(String id)Set album ID of the album to be built.Album.BuildersetImages(Image... images)Set the cover art in different sizes of the album to be built.Album.BuildersetLabel(String label)Set the label of the album to be built.Album.BuildersetName(String name)Set the name of the album to be built.Album.BuildersetPopularity(Integer popularity)Set the popularity of the album to be built.Album.BuildersetReleaseDate(String releaseDate)Set the release date of the album to be built.Album.BuildersetReleaseDatePrecision(ReleaseDatePrecision releaseDatePrecision)Set the release date precision of the album to be built.Album.BuildersetTracks(Paging<TrackSimplified> tracks)Set the tracks of the album to be built.Album.BuildersetType(ModelObjectType type)Set the type of the model object.Album.BuildersetUri(String uri)Set the Spotify album URI of the album to be built.
-
-
-
Method Detail
-
setAlbumType
public Album.Builder setAlbumType(AlbumType albumType)
Set the type of the album to be built.- Parameters:
albumType- TheAlbumType.- Returns:
- A
Album.Builder.
-
setArtists
public Album.Builder setArtists(ArtistSimplified... artists)
Set the artists of the album to be built.- Parameters:
artists-ArtistSimplifiedobjects.- Returns:
- A
Album.Builder.
-
setAvailableMarkets
public Album.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
Album.Builder.
-
setCopyrights
public Album.Builder setCopyrights(Copyright... copyrights)
Set the copyrights of the album to be built.- Parameters:
copyrights-Copyrightobjects.- Returns:
- A
Album.Builder.
-
setExternalIds
public Album.Builder setExternalIds(ExternalId externalIds)
Set the external IDs of the album to be built.- Parameters:
externalIds-ExternalIdobject.- Returns:
- A
Album.Builder.
-
setExternalUrls
public Album.Builder setExternalUrls(ExternalUrl externalUrls)
Set external URLs of the album to be built.- Parameters:
externalUrls-ExternalUrlobject.- Returns:
- A
Album.Builder.
-
setGenres
public Album.Builder setGenres(String... genres)
Set the genres of the album to be built.- Parameters:
genres- Genre names.- Returns:
- A
Album.Builder.
-
setHref
public Album.Builder setHref(String href)
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
public Album.Builder setId(String id)
Set album ID of the album to be built.- Parameters:
id- Spotify album ID.- Returns:
- A
Album.Builder.
-
setImages
public Album.Builder setImages(Image... images)
Set the cover art in different sizes of the album to be built.- Parameters:
images-Imageobjects.- Returns:
- A
Album.Builder.
-
setLabel
public Album.Builder setLabel(String label)
Set the label of the album to be built.- Parameters:
label- The album label.- Returns:
- A
Album.Builder.
-
setName
public Album.Builder setName(String name)
Set the name of the album to be built.- Parameters:
name- The album name.- Returns:
- A
Album.Builder.
-
setPopularity
public Album.Builder setPopularity(Integer popularity)
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
public Album.Builder setReleaseDate(String releaseDate)
Set the release date of the album to be built.- Parameters:
releaseDate- The release date of the album.- Returns:
- A
Album.Builder.
-
setReleaseDatePrecision
public Album.Builder setReleaseDatePrecision(ReleaseDatePrecision releaseDatePrecision)
Set the release date precision of the album to be built.- Parameters:
releaseDatePrecision- TheReleaseDatePrecisionof the album.- Returns:
- A
Album.Builder.
-
setTracks
public Album.Builder setTracks(Paging<TrackSimplified> tracks)
Set the tracks of the album to be built.- Parameters:
tracks- APagingobject containingTrackSimplifiedobjects.- Returns:
- A
Album.Builder.
-
setType
public Album.Builder setType(ModelObjectType type)
Set the type of the model object. In this case "album".- Parameters:
type- TheModelObjectType.- Returns:
- A
Album.Builder.
-
setUri
public Album.Builder setUri(String uri)
Set the Spotify album URI of the album to be built.- Parameters:
uri- Spotify album URI.- Returns:
- A
Album.Builder.
-
build
public Album 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.
-
-