public class jMusicHub
extends java.lang.Object
Constructor and Description |
---|
jMusicHub() |
Modifier and Type | Method and Description |
---|---|
static Album |
addAlbum(java.util.Scanner scan)
addAlbum is used to add albums thanks to the "a" option
|
static AudioBook |
addAudioBook(java.util.Scanner scan)
addAudioBook is used to add songs thanks to the "l" option
|
static Playlist |
addPlaylist(java.util.Scanner scan,
java.util.ArrayList<Song> songs,
java.util.ArrayList<AudioBook> audiobooks)
addPlaylist is used to add playlist thanks to the "p" option
|
static Song |
addSong(java.util.Scanner scan)
addSong is used to add songs thanks to the "c" option
|
static void |
addSongToAlbum(java.util.Scanner scan,
java.util.ArrayList<Album> albums,
java.util.ArrayList<Song> songs) |
static void |
contentOfAlbum(java.util.ArrayList<Album> albums) |
static void |
contentOfPlaylist(java.util.ArrayList<Playlist> playlists) |
static java.util.ArrayList<Playlist> |
delPlaylist(java.util.ArrayList<Playlist> playlists) |
static java.util.ArrayList |
extract(java.lang.String filename)
Extract is used to print the content of the files and put them in the ArrayList used to add elements.
|
static void |
listAlbumsByDate() |
static void |
listAlbumsByGenre() |
static void |
listAudioBooksByAuthor() |
static void |
listById(java.lang.String filename)
list is called when using the "AB", "S", "A" and "P" commands in order to list the elements in respective files.
|
static void |
listPlaylistsByName() |
static void |
main(java.lang.String[] args) |
static void |
save(java.lang.String filename,
java.util.ArrayList elements)
save is used by the command "s"
It is used to serialize (save) arrays of a list into the type's file.i
Exemple : save("nameOfTheFile", elements)
It will save the arrayList named elements into nameOfTheFile in the working directory.
|
public static Song addSong(java.util.Scanner scan)
scan
- Scanner Objectpublic static AudioBook addAudioBook(java.util.Scanner scan)
scan
- Scanner Objectpublic static Album addAlbum(java.util.Scanner scan)
scan
- Scanner Objectpublic static Playlist addPlaylist(java.util.Scanner scan, java.util.ArrayList<Song> songs, java.util.ArrayList<AudioBook> audiobooks)
scan
- Scanner Objectpublic static void save(java.lang.String filename, java.util.ArrayList elements)
filename
- Stringelements
- ArrayListpublic static void listById(java.lang.String filename)
filename
- Stringpublic static void listPlaylistsByName()
public static void listAlbumsByDate()
public static void listAlbumsByGenre()
public static void listAudioBooksByAuthor()
public static java.util.ArrayList extract(java.lang.String filename)
filename
- Stringpublic static void addSongToAlbum(java.util.Scanner scan, java.util.ArrayList<Album> albums, java.util.ArrayList<Song> songs)
public static java.util.ArrayList<Playlist> delPlaylist(java.util.ArrayList<Playlist> playlists)
public static void contentOfPlaylist(java.util.ArrayList<Playlist> playlists)
public static void contentOfAlbum(java.util.ArrayList<Album> albums)
public static void main(java.lang.String[] args)