Class PlaylistTrack.Builder
java.lang.Object
com.wrapper.spotify.model_objects.AbstractModelObject.Builder
com.wrapper.spotify.model_objects.specification.PlaylistTrack.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
- PlaylistTrack
public static final class PlaylistTrack.Builder extends AbstractModelObject.Builder
Builder class for building
PlaylistTrack instances.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description PlaylistTrackbuild()Build a model object with the information set in the builder object.PlaylistTrack.BuildersetAddedAt(Date addedAt)Set the "added at" date of the playlist track to be built.PlaylistTrack.BuildersetAddedBy(User addedBy)Set the user who added the track to the playlist.PlaylistTrack.BuildersetIsLocal(Boolean isLocal)Set whether the track to be built is local or not.PlaylistTrack.BuildersetTrack(Track track)Set the full track object of the playlist track to be built.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setAddedAt
Set the "added at" date of the playlist track to be built.- Parameters:
addedAt- The date and time the track was added.- Returns:
- A
PlaylistTrack.Builder.
-
setAddedBy
Set the user who added the track to the playlist.- Parameters:
addedBy- The Spotify user who added the track.- Returns:
- A
PlaylistTrack.Builder.
-
setIsLocal
Set whether the track to be built is local or not.- Parameters:
isLocal- Whether this track is a local file or not.- Returns:
- A
PlaylistTrack.Builder.
-
setTrack
Set the full track object of the playlist track to be built.- Parameters:
track- Information about the track.- Returns:
- A
PlaylistTrack.Builder.
-
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.
-