public interface Playlist
A playlist/collection that is stored in a database. The implementation of this is service provider-dependent.
-
Method Summary
Modifier and TypeMethodDescriptionThe user that created the playlist.getId()The unique ID of the playlist.The service provider that this playlist is from.getTitle()The name of the playlist.intThe number of tracks in the playlist.If the playlist was created with a pre-populated set of songs, a list of contained tracks are returned.
-
Method Details
-
getId
String getId()The unique ID of the playlist. This means different things for each implementation.- Returns:
- The unique ID of the playlist
-
getTitle
-
getCreator
-
getTrackCount
int getTrackCount()The number of tracks in the playlist.- Returns:
- The number of tracks in the playlist
-
getTracks
If the playlist was created with a pre-populated set of songs, a list of contained tracks are returned. Otherwise, an empty optional will be returned, and it should be fetched via the implementation-specific way.- Returns:
- An optional containing pre-populated tracks, if no additional work should be done to fetch tracks
-
getServiceProvider
Optional<ServiceProvider> getServiceProvider()The service provider that this playlist is from.- Returns:
- The service provider that this playlist is from
-