Class PlaylistTrack
- java.lang.Object
-
- se.michaelthelin.spotify.model_objects.AbstractModelObject
-
- se.michaelthelin.spotify.model_objects.specification.PlaylistTrack
-
- All Implemented Interfaces:
Serializable,IModelObject
public class PlaylistTrack extends AbstractModelObject
Retrieve information about Playlist Track objects by building instances from this class.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPlaylistTrack.BuilderBuilder class for buildingPlaylistTrackinstances.static classPlaylistTrack.JsonUtilJsonUtil class for buildingPlaylistTrackinstances.-
Nested classes/interfaces inherited from interface se.michaelthelin.spotify.model_objects.IModelObject
IModelObject.IJsonUtil<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlaylistTrack.Builderbuilder()Create a builder for building an instance of a model object.DategetAddedAt()Get the date, when the track or episode has been added to its playlist.UsergetAddedBy()Get the user, who added the track or episode to its playlist.BooleangetIsLocal()Check whether a playlist track is a local track or episode or not.
Local tracks can only be played on devices, where the track files are present.IPlaylistItemgetTrack()Get a full track or episode object from this playlist track object.StringtoString()Returns a String representation of this model object in the style:
-
-
-
Method Detail
-
getAddedAt
public Date getAddedAt()
Get the date, when the track or episode has been added to its playlist. Note: Some very old playlists may returnnullin this field.- Returns:
- The date and time the track or episode was added.
-
getAddedBy
public User getAddedBy()
Get the user, who added the track or episode to its playlist. Note: Some very old playlists may return null in this field.- Returns:
- The Spotify user who added the track or episode.
-
getIsLocal
public Boolean getIsLocal()
Check whether a playlist track is a local track or episode or not.
Local tracks can only be played on devices, where the track files are present.- Returns:
- Whether this track is a local file or not.
-
getTrack
public IPlaylistItem getTrack()
Get a full track or episode object from this playlist track object.- Returns:
- Information about the track.
-
toString
public String toString()
Description copied from class:AbstractModelObjectReturns a String representation of this model object in the style:ModelObject(attr1=value1, attr2=value2, ...)- Specified by:
toStringin classAbstractModelObject
-
builder
public PlaylistTrack.Builder builder()
Description copied from interface:IModelObjectCreate a builder for building an instance of a model object.
The type of the builder and its methods depend on its corresponding implementation.- Returns:
- A builder object.
-
-