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 void
addFiles(Path... files)
Add files to playlist.void
addTracks(long... ids)
Add tracks to playlist.void
addTracks(Track... tracks)
Add tracks to playlist.Playlist
createFolder()
Creates a Folder in this playlist.Playlist
createPlaylist()
Creates a Playlist in this playlist.void
delete()
Delete this playlist.String
getDescription()
Description.AudioSong.Liking
getLiking()
Get liking.Playlist
getParent()
Returns the parent of this playlist or null if there is none.Track
getTrack(int index)
Gets the track with the given index.Track
getTrack(long id)
Gets the track in this playlist with the specified persistent id.Track
getTrack(String id)
Gets the track in this playlist with the specified persistent id.int
getTrackCount()
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.void
move(Playlist newParentPlaylist)
Moves this playlist to some other playlist.void
play()
Play this playlist in iTunes.void
setDescription(String description)
Set description.void
setLiking(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.
-
-