Package com.tagtraum.tunes
Interface Playlist
-
- All Superinterfaces:
Item
- All Known Subinterfaces:
LibraryPlaylist
public interface Playlist extends Item
Playlist.- Author:
- Hendrik Schreiber
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddFiles(Path... files)Add files to playlist.voidaddTracks(long... ids)Add tracks to playlist.voidaddTracks(Track... tracks)Add tracks to playlist.PlaylistcreateFolder()Creates a Folder in this playlist.PlaylistcreatePlaylist()Creates a Playlist in this playlist.voiddelete()Delete this playlist.StringgetDescription()Description.AudioSong.LikinggetLiking()Get liking.PlaylistgetParent()Returns the parent of this playlist or null if there is none.TrackgetTrack(int index)Gets the track with the given index.TrackgetTrack(long id)Gets the track in this playlist with the specified persistent id.TrackgetTrack(String id)Gets the track in this playlist with the specified persistent id.intgetTrackCount()Number of tracks in this playlist.Track[]getTracks()Get all tracks from this playlist.default Track[]getTracks(long... ids)Get specific tracks from this playlist.voidmove(Playlist newParentPlaylist)Moves this playlist to some other playlist.voidplay()Play this playlist in iTunes.voidsetDescription(String description)Set description.voidsetLiking(AudioSong.Liking liking)Set liking.
-
-
-
Method Detail
-
getDescription
String getDescription()
Description.- Returns:
- description
-
setDescription
void setDescription(String description)
Set description.- Parameters:
description- description
-
getLiking
AudioSong.Liking getLiking()
Get liking.- Returns:
- liking
-
setLiking
void setLiking(AudioSong.Liking liking)
Set liking.- Parameters:
liking- liking
-
getTrackCount
int getTrackCount()
Number of tracks in this playlist.- Returns:
- track count
-
getTracks
Track[] getTracks()
Get all tracks from this playlist.- Returns:
- array of tracks
-
getTrack
Track getTrack(long id)
Gets the track in this playlist with the specified persistent id.- Parameters:
id- persistent id- Returns:
- track or null, if not found
-
getTracks
default Track[] getTracks(long... ids)
Get specific tracks from this playlist.- Returns:
- array of tracks
-
getTrack
Track getTrack(int index) throws IndexOutOfBoundsException
Gets the track with the given index.- Parameters:
index- index- Returns:
- track in question
- Throws:
IndexOutOfBoundsException
-
getTrack
Track getTrack(String id)
Gets the track in this playlist with the specified persistent id.- Parameters:
id- persistent id- Returns:
- track or null, if not found
-
createPlaylist
Playlist createPlaylist()
Creates a Playlist in this playlist.- Returns:
- the new playlist
-
createFolder
Playlist createFolder()
Creates a Folder in this playlist.- Returns:
- the new folder
-
getParent
Playlist getParent()
Returns the parent of this playlist or null if there is none.- Returns:
- the parent of this playlist
-
addFiles
void addFiles(Path... files)
Add files to playlist.- Parameters:
files- files to add
-
addTracks
void addTracks(Track... tracks)
Add tracks to playlist.- Parameters:
tracks- files to add
-
addTracks
void addTracks(long... ids)
Add tracks to playlist.- Parameters:
ids- track ids
-
delete
void delete()
Delete this playlist.
-
move
void move(Playlist newParentPlaylist)
Moves this playlist to some other playlist.- Parameters:
newParentPlaylist- new parent playlist
-
play
void play()
Play this playlist in iTunes.
-
-