From 7c23f453d166d396451504e26fbb385afc0c4c13 Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Mon, 28 Dec 2020 17:31:33 +0100 Subject: Finishing javadoc --- Album.java | 11 ++- AudioBook.java | 8 +- MusicalElement.java | 104 ++++++++++++++++++++++--- Playlist.java | 85 ++++++++++++++++++++- README.md | 1 - Song.java | 76 ++++++++++++++++++- jMusicHub.java | 134 +++++++++++++++++++++++++++------ javadoc/Album.html | 10 ++- javadoc/AudioBook.html | 14 ++-- javadoc/Category.html | 2 +- javadoc/Genre.html | 2 +- javadoc/Language.html | 2 +- javadoc/MusicalElement.html | 94 +++++++++++++++++++---- javadoc/Playlist.html | 75 +++++++++++++++--- javadoc/Song.html | 69 ++++++++++++++--- javadoc/allclasses-frame.html | 2 +- javadoc/allclasses-noframe.html | 2 +- javadoc/constant-values.html | 2 +- javadoc/deprecated-list.html | 2 +- javadoc/help-doc.html | 2 +- javadoc/index-all.html | 163 ++++++++++++++++++++++++++++------------ javadoc/index.html | 2 +- javadoc/jMusicHub.html | 162 +++++++++++++++++++++++++++++++-------- javadoc/overview-tree.html | 2 +- javadoc/package-frame.html | 2 +- javadoc/package-summary.html | 10 ++- javadoc/package-tree.html | 2 +- javadoc/serialized-form.html | 2 +- 28 files changed, 858 insertions(+), 184 deletions(-) diff --git a/Album.java b/Album.java index 71bf0d7..7b30ca1 100644 --- a/Album.java +++ b/Album.java @@ -18,6 +18,7 @@ import java.io.Serializable; * * @version 1.0 * + * @see Song * @author Aimeric ADJUTOR */ @@ -54,7 +55,7 @@ public class Album implements Serializable { * * @return It returns the id, which is an int. * - * @author Aimeric ADJUTOR + * @author Aimeric ADJUTOR * */ public int getId(){return id;} @@ -99,6 +100,12 @@ public class Album implements Serializable { * @author Aimeric ADJUTOR * */ public Date getDate(){return date;} + +/** + * This method is used to print the each songs contained in the songs attribute of the album. + * + * @author Aimeric ADJUTOR + * */ public void getSongs(){ for ( Song s : songs ){ System.out.println(s); @@ -135,7 +142,7 @@ public class Album implements Serializable { /** * Basic method to set the title of the album. * - *@param title String + * @param title String * * @author Aimeric ADJUTOR * */ diff --git a/AudioBook.java b/AudioBook.java index 1e6f0e3..a4888bf 100644 --- a/AudioBook.java +++ b/AudioBook.java @@ -58,7 +58,7 @@ public class AudioBook extends MusicalElement { /** * This method is used to give the language of the audiobook. * - * @return It returns the language, which is a String because the constructor use the name method of the Language object. + * @return It returns the language, which is a String because the constructor use the name method of the Language class. * * @see Language * @author Aimeric ADJUTOR @@ -68,7 +68,7 @@ public class AudioBook extends MusicalElement { /** * This method is used to give the category of the audiobook. * - * @return It returns the category, which is a String because the constructor use the name method of the Category object. + * @return It returns the category, which is a String because the constructor use the name method of the Category class. * * @see Category * @author Aimeric ADJUTOR @@ -76,7 +76,7 @@ public class AudioBook extends MusicalElement { public String getCategory(){return category;} /** - * Basic method to set the author of audiobook. + * Basic method to set the author of the audiobook. * * @param author String * @@ -85,7 +85,7 @@ public class AudioBook extends MusicalElement { public void setArtist(String author){this.author=author;} /** - * Basic method to set the language of the audiobook using the name method from the Language object. + * Basic method to set the language of the audiobook using the name method from the Language class. * * @param language Language * diff --git a/MusicalElement.java b/MusicalElement.java index 9094913..fee560e 100644 --- a/MusicalElement.java +++ b/MusicalElement.java @@ -1,18 +1,42 @@ -import java.io.Serializable; +/* + * Name : MusicalElement + * + * Description : The MusicalElement contains the base of songs and audiobooks. + * + * Version : 1.0 + * + * Date : 28/12/2020 + * + * Copyright : Aimeric ADJUTOR + */ -/** The MusicalElement contains the base of songs and audiobooks. - * It is the abstract class they will take. - * We use the classical get and set here. - * Get is used to return the said value. - * Set is used to modify the later.*/ +import java.io.Serializable; +/** + * The MusicalElement contains the base of songs and audiobooks. + * It's the abstract class they will extend. + * + * @version 1.0 + * + * @see Song + * @see AudioBook + * @author Aimeric ADJUTOR + * */ public abstract class MusicalElement implements Serializable { //Our vars private int id, duration; private String title, content; - +/** + * Constructor method. + * + * @param title String + * @param duration int + * @param content String, path to the mp3 file + * + * @author Aimeric ADJUTOR + * */ public MusicalElement(String title, int duration, String content) { this.title=title; this.duration=duration; @@ -20,17 +44,77 @@ public abstract class MusicalElement implements Serializable { } //the gets +/** + * This method is used to give the id of the element. + * + * @return id int + * + * @author Aimeric ADJUTOR + * */ public int getId(){return id;} + +/** + * This method is used to give the title of the element. + * + * @return title String + * + * @author Aimeric ADJUTOR + * */ public String getTitle(){return title;} + +/** + * This method is used to give the duration of the element. + * + * @return duration int + * + * @author Aimeric ADJUTOR + * */ public int getDuration(){return duration;} + +/** + * This method is used to give the content path of the element. + * + * @return content String + * + * @author Aimeric ADJUTOR + * */ public String getContent(){return content;} //the sets + +/** + * Basic method to set the id of the element. + * + * @param id int + * + * @author Aimeric ADJUTOR + * */ public void setId(int id){this.id=id;} - public void setTitle(String title){this.title=title;} - public void setDuration(int duration){this.duration=duration;} - public void setContent(String content){this.content=content;} +/** + * Basic method to set the title of the element. + * + * @param title String + * + * @author Aimeric ADJUTOR + * */ + public void setTitle(String title){this.title=title;} +/** + * Basic method to set the duration of the element. + * + * @param duration int + * + * @author Aimeric ADJUTOR + * */ + public void setDuration(int duration){this.duration=duration;} +/** + * Basic method to set the content path of the element. + * + * @param content String + * + * @author Aimeric ADJUTOR + * */ + public void setContent(String content){this.content=content;} } diff --git a/Playlist.java b/Playlist.java index fc1ea94..94cfdd6 100644 --- a/Playlist.java +++ b/Playlist.java @@ -1,6 +1,27 @@ +/* + * Name : Playlist + * + * Description : The Playlist class is used to create playlists containing songs and audiobooks. + * + * Version : 1.0 + * + * Date : 28/12/2020 + * + * Copyright : Aimeric ADJUTOR + */ + import java.util.ArrayList; import java.io.Serializable; +/** + * The Playlist class is used to create playlists containing songs and audiobooks. + * + * @version 1.0 + * @see Song + * @see AudioBook + * @author Aimeric ADJUTOR + */ + public class Playlist implements Serializable { private static final long serialVersionUID = 6021717365357635741L; @@ -9,19 +30,59 @@ public class Playlist implements Serializable { private ArrayList songs = new ArrayList(); private ArrayList audiobooks = new ArrayList(); +/** + * Constructor method. + * + * @param name String + * @param songs ArrayList + * @param audiobooks ArrayList + * + * @see Song + * @see AudioBook + * + * @author Aimeric ADJUTOR + * */ public Playlist(String name, ArrayList songs, ArrayList audiobooks) { this.name=name; this.songs=songs; this.audiobooks=audiobooks; } +/** + * This method is used to give the id of the playlist. + * + * @return id int + * + * @author Aimeric ADJUTOR + * */ public int getId(){return id;} - public String getName(){return name.toUpperCase();} //using toUpperCase method because the way I sort by name sort he upper case then the lower case, which is inconvenient. + +/** + * This method is used to give the name of the playlist in uppercase. + * Using toUpperCase method because the way I sort by name sorts the upper case then the lower case, which is inconvenient. + * + * @return name.toUpperCase String + * + * @author Aimeric ADJUTOR + * */ + public String getName(){return name.toUpperCase();} + +/** + * This method is used to print the each songs contained in the songs attribute of the playlist. + * + * @author Aimeric ADJUTOR + * */ public void getSongs(){ for ( Song s : songs ){ System.out.println(s); } } + +/** + * This method is used to print the each audiobooks contained in the audiobooks attribute of the playlist. + * + * @author Aimeric ADJUTOR + * */ public void getAudioBooks(){ for (AudioBook b : audiobooks ){ System.out.println(b); @@ -29,9 +90,31 @@ public class Playlist implements Serializable { } +/** + * Basic method to set the id of the playlist. + * + * @param id int + * + * @author Aimeric ADJUTOR + * */ public void setId(int id){this.id=id;} + +/** + * Basic method to set the name of the playlist. + * + * @param name String + * + * @author Aimeric ADJUTOR + * */ public void setName(String name){this.name=name;} +/** + * Basic method to "configure" what does a print of this object actually does. + * + * @return String, using the object's methods + * + * @author Aimeric ADJUTOR + * */ public String toString() { return "Id : "+getId()+"\nName : "+getName(); } diff --git a/README.md b/README.md index 3120585..740bb6b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ OOP project in Java done in my first year, first semester at ESIEA. TO DO : - - Generating the javadoc - Doing the UML Diagramm - Doing the report - Sending in the whole thing diff --git a/Song.java b/Song.java index 322f606..a476d2c 100644 --- a/Song.java +++ b/Song.java @@ -1,23 +1,93 @@ -/** - * Song is using instanciating MusicalElement and is Serializable. - * */ +/* + * Name : Song + * + * Description : The Song class is used to create songs while extending MusicalElement + * + * Version : 1.0 + * + * Date : 28/12/2020 + * + * Copyright : Aimeric ADJUTOR + */ +/** + * The Song class is used to create songs while extending MusicalElement. + * + * @version 1.0 + * + * @see MusicalElement + * @author Aimeric ADJUTOR + */ public class Song extends MusicalElement{ private static final long serialVersionUID = 2112880640160601826L; private String artist, genre; +/** + * Constructor method. + * + * @param title String + * @param duration int + * @param content String, path to the mp3 file + * @param artist String + * @param genre Genre + * + * @see Genre + * + * @author Aimeric ADJUTOR + * */ public Song(String title, int duration, String content, String artist, Genre genre) { super(title, duration, content); this.artist=artist; this.genre=genre.name(); } +/** + * This method is used to give the artist of the song. + * + * @return artist String + * + * @author Aimeric ADJUTOR + * */ public String getArtist(){return artist;} + +/** + * This method is used to give the genre of the song. + * + * @return It returns the genre, which is a String because the constructor use the name method of the Genre class. + * + * @see Genre + * @author Aimeric ADJUTOR + * */ public String getGenre(){return genre;} + +/** + * Basic method to set the artist of the song. + * + * @param artist String + * + * @author Aimeric ADJUTOR + * */ public void setArtist(String artist){this.artist=artist;} + +/** + * Basic method to set the genre of the song using the name method from the Genre class. + * + * @param genre Genre + * + * @see Genre + * + * @author Aimeric ADJUTOR + * */ public void setGenre(Genre genre){this.genre=genre.name();} +/** + * Basic method to "configure" what does a print of this object actually does. + * + * @return String, using the object's methods + * + * @author Aimeric ADJUTOR + * */ public String toString() { return "Id : "+getId()+"\nTitle : "+getTitle()+"\nDuration : "+getDuration()+"\nContent : "+getContent()+"\nArtist : "+getArtist()+"\nGenre : "+getGenre(); } diff --git a/jMusicHub.java b/jMusicHub.java index 363695e..56bb957 100644 --- a/jMusicHub.java +++ b/jMusicHub.java @@ -1,21 +1,37 @@ +/* + * Name : jMusicHub + * + * Description : The jMusicHub class is our main component. It's basically the app we use to launch the whole process + * + * Version : 1.0 + * + * Date : 28/12/2020 + * + * Copyright : Aimeric ADJUTOR + */ + import java.util.*; import java.io.*; import java.text.*; /** - * The jMusicHub class is basically the app. - * It is used to launch the whole process. + * The jMusicHub class is our main component. + * It's basically the app we use to launch the whole process. * * @author Aimeric ADJUTOR * @version 1.0 * @since 2020-11-13 * */ - public class jMusicHub { /** - * addSong is used to add songs thanks to the "c" option - * @param scan Scanner Object + * addSong is used to add songs thanks to the "c" option. + * It prompts to the user a series of interrogations, asks to confirm. + * A new song is then created and returned. + * @param scan Scanner + * @return newSong Song + * @see Song + * @author Aimeric ADJUTOR */ public static Song addSong(Scanner scan){ System.out.println("Adding a song..."); @@ -54,8 +70,13 @@ public class jMusicHub { } /** - * addAudioBook is used to add songs thanks to the "l" option - * @param scan Scanner Object + * addAudioBook is used to add songs thanks to the "l" option. + * It prompts to the user a series of interrogations, asks to confirm. + * A new audiobook is then created and returned. + * @param scan Scanner + * @return newAudioBook AudioBook + * @see AudioBook + * @author Aimeric ADJUTOR */ public static AudioBook addAudioBook(Scanner scan){ System.out.println("Adding an audiobook..."); @@ -99,8 +120,13 @@ public class jMusicHub { } /** - * addAlbum is used to add albums thanks to the "a" option - * @param scan Scanner Object + * addAlbum is used to add albums thanks to the "a" option. + * It prompts to the user a series of interrogations, asks to confirm. + * A new album is then created and returned. + * @param scan Scanner + * @return newAlbum Album + * @see Album + * @author Aimeric ADJUTOR */ public static Album addAlbum(Scanner scan){ System.out.println("\n[DISCLAIMER : You have to register the songs after creating (a) and saving (s) the albums]\n"); @@ -140,8 +166,15 @@ public class jMusicHub { } /** - * addPlaylist is used to add playlist thanks to the "p" option - * @param scan Scanner Object + * addPlaylist is used to add playlist thanks to the "p" option. + * It prompts to the user a series of interrogations, asks to confirm. + * A new playlist is then created and returned. + * @param scan Scanner + * @param songs ArrayList + * @param audiobooks ArrayList + * @return newPlaylist Playlist + * @see Playlist + * @author Aimeric ADJUTOR */ public static Playlist addPlaylist(Scanner scan, ArrayList songs, ArrayList audiobooks){ String userInput; @@ -206,12 +239,11 @@ public class jMusicHub { } /** - * 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. + * save is used by the command "s". + * It is used to serialize (save) arrays of a list into the type's file. * @param filename String * @param elements ArrayList + * @author Aimeric ADJUTOR * */ @SuppressWarnings ("rawtypes") public static void save(String filename, ArrayList elements){ @@ -239,8 +271,8 @@ public class jMusicHub { /** * list is called when using the "AB", "S", "A" and "P" commands in order to list the elements in respective files. * @param filename String + * @author Aimeric ADJUTOR * */ - public static void listById(String filename){ // Deserialization @@ -308,6 +340,12 @@ public class jMusicHub { catch (ClassNotFoundException ex) {System.out.println("ClassNotFoundException is caught");} } +/** + * listPlaylistsByName is called when using the "PN" command in order to list the playlists sorted by their name. + * To achieve that, I had to put names in uppercase with getName from Playlist. + * @see Playlist#getName + * @author Aimeric ADJUTOR + * */ public static void listPlaylistsByName(){ String filename = "playlists"; try { @@ -330,7 +368,10 @@ public class jMusicHub { catch (IOException ex) {System.out.println(filename+ " file missing.");} catch (ClassNotFoundException ex) {System.out.println("ClassNotFoundException is caught");} } - +/** + * listAlbumsByDate is called by the "AD" command in order to list the albums sorted by the date of release. + * @author Aimeric ADJUTOR + * */ public static void listAlbumsByDate(){ String filename = "albums"; try { @@ -354,6 +395,11 @@ public class jMusicHub { catch (ClassNotFoundException ex) {System.out.println("ClassNotFoundException is caught");} } +/** + * listAlbumsByGenre is called by the "AG" command in order to list the albums sorted by the genre of their songs. + * @see Album#getGenre + * @author Aimeric ADJUTOR + * */ public static void listAlbumsByGenre(){ String filename = "albums"; try { @@ -376,7 +422,10 @@ public static void listAlbumsByGenre(){ catch (IOException ex) {System.out.println(filename+ " file missing.");} catch (ClassNotFoundException ex) {System.out.println("ClassNotFoundException is caught");} } - +/** + * listAudioBooksByAuthor is called by the "BA" command in order to list the audiobooks sorted by authors. + * @author Aimeric ADJUTOR + * */ public static void listAudioBooksByAuthor(){ String filename = "audiobooks"; try { @@ -403,6 +452,8 @@ public static void listAudioBooksByAuthor(){ /** * Extract is used to print the content of the files and put them in the ArrayList used to add elements. * @param filename String + * @return ArrayList + * @author Aimeric ADJUTOR * */ @SuppressWarnings("rawtypes") public static ArrayList extract(String filename){ @@ -484,6 +535,13 @@ public static void listAudioBooksByAuthor(){ } } +/** + * addSongToAlbum is called by the "+" command in order to add a song to an album. + * @param scan Scanner + * @param albums ArrayList + * @param songs ArrayList + * @author Aimeric ADJUTOR + * */ public static void addSongToAlbum(Scanner scan, ArrayList albums, ArrayList songs){ System.out.println("Adding a existing song to an existing album..."); listById("songs"); @@ -507,6 +565,12 @@ public static void listAudioBooksByAuthor(){ } } +/** + * delPlaylist is called by the "-" command in order to delete a playlist. + * @param playlists ArrayList + * @return playlists ArrayList + * @author Aimeric ADJUTOR + * */ public static ArrayList delPlaylist(ArrayList playlists){ Scanner scan = new Scanner(System.in); listById("playlists"); @@ -534,6 +598,11 @@ public static void listAudioBooksByAuthor(){ return playlists; } +/** + * contentOfPlaylist is called by the "PC" command in order to display the content of a chosen playlist. + * @param playlists ArrayList + * @author Aimeric ADJUTOR + * */ public static void contentOfPlaylist(ArrayList playlists){ Scanner scan = new Scanner(System.in); listById("playlists"); @@ -550,7 +619,11 @@ public static void listAudioBooksByAuthor(){ } } } - +/** + * contentOfAlbum is called by the "AC" command in order to display the content of a chosen album. + * @param albums ArrayList + * @author Aimeric ADJUTOR + * */ public static void contentOfAlbum(ArrayList albums){ Scanner scan = new Scanner(System.in); listById("albums"); @@ -566,6 +639,18 @@ public static void listAudioBooksByAuthor(){ } } +/** + * Constructor method, it is calling every methods and contains the command prompt. + * @see Song + * @see AudioBook + * @see Album + * @see Playlist + * @see Genre + * @see Category + * @see Language + * + * @author Aimeric ADJUTOR + * */ public jMusicHub() { System.out.println("Welcome to the jMusicHub !\n"); @@ -592,7 +677,7 @@ public static void listAudioBooksByAuthor(){ switch(userInput) { case "h" : //page help - System.out.printf("c: add a new song\na: add a new album\n+: add an existing song to an album\nl: add a new audiobook\n\np: create a new playlist from existing songs and audiobooks\n-: delete a playlist\n\ns: save playlists, albums, songs and audiobooks into the concerned files\n\nS: List all your saved songs\nB: List all your saved audiobooks\nA: List all your saved albums\nP: List all your saved playlists\n\nPS: Print playlists sorted by their name\nPC: Print the content of a playlist\nAD: Print albums sorted by their date of release\nAG: Print albums sorted by their genre\nAC: Print the content of an album\nBA: Print audiobooks sorted by their author's name\n\nh: print this help screen\nq: quit the program\n"); + System.out.printf("c: add a new song\na: add a new album\n+: add an existing song to an album\nl: add a new audiobook\n\np: create a new playlist from existing songs and audiobooks\n-: delete a playlist\n\ns: save playlists, albums, songs and audiobooks into the concerned files\n\nS: List all your saved songs\nB: List all your saved audiobooks\nA: List all your saved albums\nP: List all your saved playlists\n\nPN: Print playlists sorted by their name\nPC: Print the content of a playlist\nAD: Print albums sorted by their date of release\nAG: Print albums sorted by their genre\nAC: Print the content of an album\nBA: Print audiobooks sorted by their author's name\n\nh: print this help screen\nq: quit the program\n"); break; case "q" : //quit @@ -716,7 +801,7 @@ public static void listAudioBooksByAuthor(){ case "P": //print playlists sorted by id listById("playlists"); break; - case "PS": //print playlists sorted by their name + case "PN": //print playlists sorted by their name listPlaylistsByName(); break; case "PC": //display content of a chosen playlist @@ -739,6 +824,13 @@ public static void listAudioBooksByAuthor(){ } } while(!userInput.equals("q")); } + +/** + * The main method is used to launch the app. + * @param args String[] + * @author Aimeric ADJUTOR + * */ + public static void main(String[] args) { new jMusicHub(); } diff --git a/javadoc/Album.html b/javadoc/Album.html index 6854986..0b51dd4 100644 --- a/javadoc/Album.html +++ b/javadoc/Album.html @@ -2,7 +2,7 @@ - + Album @@ -116,7 +116,8 @@ implements java.io.Serializable
The album class is used to create albums containing songs added after its creation and the creation of the songs.
See Also:
-
Serialized Form
+
Song, +Serialized Form
@@ -197,7 +198,9 @@ implements java.io.Serializable void -getSongs()  +getSongs() +
This method is used to print the each songs contained in the songs attribute of the album.
+ java.lang.String @@ -369,6 +372,7 @@ implements java.io.Serializable
  • getSongs

    public void getSongs()
    +
    This method is used to print the each songs contained in the songs attribute of the album.
  • diff --git a/javadoc/AudioBook.html b/javadoc/AudioBook.html index c8ba92e..273279c 100644 --- a/javadoc/AudioBook.html +++ b/javadoc/AudioBook.html @@ -2,7 +2,7 @@ - + AudioBook @@ -186,7 +186,7 @@ extends MusicalEl void setArtist(java.lang.String author) -
    Basic method to set the author of audiobook.
    +
    Basic method to set the author of the audiobook.
    @@ -198,7 +198,7 @@ extends MusicalEl void setGenre(Language language) -
    Basic method to set the language of the audiobook using the name method from the Language object.
    +
    Basic method to set the language of the audiobook using the name method from the Language class.
    @@ -295,7 +295,7 @@ extends MusicalEl
    This method is used to give the language of the audiobook.
    Returns:
    -
    It returns the language, which is a String because the constructor use the name method of the Language object.
    +
    It returns the language, which is a String because the constructor use the name method of the Language class.
    See Also:
    Language
    @@ -311,7 +311,7 @@ extends MusicalEl
    This method is used to give the category of the audiobook.
    Returns:
    -
    It returns the category, which is a String because the constructor use the name method of the Category object.
    +
    It returns the category, which is a String because the constructor use the name method of the Category class.
    See Also:
    Category
    @@ -324,7 +324,7 @@ extends MusicalEl
  • setArtist

    public void setArtist(java.lang.String author)
    -
    Basic method to set the author of audiobook.
    +
    Basic method to set the author of the audiobook.
    Parameters:
    author - String
    @@ -338,7 +338,7 @@ extends
    MusicalEl
  • setGenre

    public void setGenre(Language language)
    -
    Basic method to set the language of the audiobook using the name method from the Language object.
    +
    Basic method to set the language of the audiobook using the name method from the Language class.
    Parameters:
    language - Language
    diff --git a/javadoc/Category.html b/javadoc/Category.html index 6894769..48f95b1 100644 --- a/javadoc/Category.html +++ b/javadoc/Category.html @@ -2,7 +2,7 @@ - + Category diff --git a/javadoc/Genre.html b/javadoc/Genre.html index f66b62a..3865929 100644 --- a/javadoc/Genre.html +++ b/javadoc/Genre.html @@ -2,7 +2,7 @@ - + Genre diff --git a/javadoc/Language.html b/javadoc/Language.html index 4f7f5e1..905a321 100644 --- a/javadoc/Language.html +++ b/javadoc/Language.html @@ -2,7 +2,7 @@ - + Language diff --git a/javadoc/MusicalElement.html b/javadoc/MusicalElement.html index fa4e8c3..e1262dc 100644 --- a/javadoc/MusicalElement.html +++ b/javadoc/MusicalElement.html @@ -2,7 +2,7 @@ - + MusicalElement @@ -118,13 +118,12 @@ var activeTableTab = "activeTableTab"; extends java.lang.Object implements java.io.Serializable
    The MusicalElement contains the base of songs and audiobooks. - It is the abstract class they will take. - We use the classical get and set here. - Get is used to return the said value. - Set is used to modify the later.
    + It's the abstract class they will extend.
    See Also:
    -
    Serialized Form
    +
    Song, +AudioBook, +Serialized Form
  • @@ -146,7 +145,9 @@ implements java.io.Serializable MusicalElement(java.lang.String title, int duration, - java.lang.String content)  + java.lang.String content) +
    Constructor method.
    +
  • @@ -165,35 +166,51 @@ implements java.io.Serializable java.lang.String -getContent()  +getContent() +
    This method is used to give the content path of the element.
    + int -getDuration()  +getDuration() +
    This method is used to give the duration of the element.
    + int -getId()  +getId() +
    This method is used to give the id of the element.
    + java.lang.String -getTitle()  +getTitle() +
    This method is used to give the title of the element.
    + void -setContent(java.lang.String content)  +setContent(java.lang.String content) +
    Basic method to set the content path of the element.
    + void -setDuration(int duration)  +setDuration(int duration) +
    Basic method to set the duration of the element.
    + void -setId(int id)  +setId(int id) +
    Basic method to set the id of the element.
    + void -setTitle(java.lang.String title)  +setTitle(java.lang.String title) +
    Basic method to set the title of the element.
    +
      @@ -226,6 +243,13 @@ implements java.io.Serializable
      public MusicalElement(java.lang.String title,
                             int duration,
                             java.lang.String content)
      +
      Constructor method.
      +
      +
      Parameters:
      +
      title - String
      +
      duration - int
      +
      content - String, path to the mp3 file
      +
    @@ -243,6 +267,11 @@ implements java.io.Serializable
  • getId

    public int getId()
    +
    This method is used to give the id of the element.
    +
    +
    Returns:
    +
    id int
    +
  • @@ -252,6 +281,11 @@ implements java.io.Serializable
  • getTitle

    public java.lang.String getTitle()
    +
    This method is used to give the title of the element.
    +
    +
    Returns:
    +
    title String
    +
  • @@ -261,6 +295,11 @@ implements java.io.Serializable
  • getDuration

    public int getDuration()
    +
    This method is used to give the duration of the element.
    +
    +
    Returns:
    +
    duration int
    +
  • @@ -270,6 +309,11 @@ implements java.io.Serializable
  • getContent

    public java.lang.String getContent()
    +
    This method is used to give the content path of the element.
    +
    +
    Returns:
    +
    content String
    +
  • @@ -279,6 +323,11 @@ implements java.io.Serializable
  • setId

    public void setId(int id)
    +
    Basic method to set the id of the element.
    +
    +
    Parameters:
    +
    id - int
    +
  • @@ -288,6 +337,11 @@ implements java.io.Serializable
  • setTitle

    public void setTitle(java.lang.String title)
    +
    Basic method to set the title of the element.
    +
    +
    Parameters:
    +
    title - String
    +
  • @@ -297,6 +351,11 @@ implements java.io.Serializable
  • setDuration

    public void setDuration(int duration)
    +
    Basic method to set the duration of the element.
    +
    +
    Parameters:
    +
    duration - int
    +
  • @@ -306,6 +365,11 @@ implements java.io.Serializable
  • setContent

    public void setContent(java.lang.String content)
    +
    Basic method to set the content path of the element.
    +
    +
    Parameters:
    +
    content - String
    +
  • diff --git a/javadoc/Playlist.html b/javadoc/Playlist.html index 56c9b27..1bc1c8d 100644 --- a/javadoc/Playlist.html +++ b/javadoc/Playlist.html @@ -2,7 +2,7 @@ - + Playlist @@ -113,9 +113,12 @@ var activeTableTab = "activeTableTab";
    public class Playlist
     extends java.lang.Object
     implements java.io.Serializable
    +
    The Playlist class is used to create playlists containing songs and audiobooks.
    See Also:
    -
    Serialized Form
    +
    Song, +AudioBook, +Serialized Form
    @@ -137,7 +140,9 @@ implements java.io.Serializable Playlist(java.lang.String name, java.util.ArrayList<Song> songs, - java.util.ArrayList<AudioBook> audiobooks)  + java.util.ArrayList<AudioBook> audiobooks) +
    Constructor method.
    + @@ -156,31 +161,45 @@ implements java.io.Serializable void -getAudioBooks()  +getAudioBooks() +
    This method is used to print the each audiobooks contained in the audiobooks attribute of the playlist.
    + int -getId()  +getId() +
    This method is used to give the id of the playlist.
    + java.lang.String -getName()  +getName() +
    This method is used to give the name of the playlist in uppercase.
    + void -getSongs()  +getSongs() +
    This method is used to print the each songs contained in the songs attribute of the playlist.
    + void -setId(int id)  +setId(int id) +
    Basic method to set the id of the playlist.
    + void -setName(java.lang.String name)  +setName(java.lang.String name) +
    Basic method to set the name of the playlist.
    + java.lang.String -toString()  +toString() +
    Basic method to "configure" what does a print of this object actually does.
    +
      @@ -213,6 +232,16 @@ implements java.io.Serializable
      public Playlist(java.lang.String name,
                       java.util.ArrayList<Song> songs,
                       java.util.ArrayList<AudioBook> audiobooks)
      +
      Constructor method.
      +
      +
      Parameters:
      +
      name - String
      +
      songs - ArrayList
      +
      audiobooks - ArrayList
      +
      See Also:
      +
      Song, +AudioBook
      +
    @@ -230,6 +259,11 @@ implements java.io.Serializable
  • getId

    public int getId()
    +
    This method is used to give the id of the playlist.
    +
    +
    Returns:
    +
    id int
    +
  • @@ -239,6 +273,12 @@ implements java.io.Serializable
  • getName

    public java.lang.String getName()
    +
    This method is used to give the name of the playlist in uppercase. + Using toUpperCase method because the way I sort by name sorts the upper case then the lower case, which is inconvenient.
    +
    +
    Returns:
    +
    name.toUpperCase String
    +
  • @@ -248,6 +288,7 @@ implements java.io.Serializable
  • getSongs

    public void getSongs()
    +
    This method is used to print the each songs contained in the songs attribute of the playlist.
  • @@ -257,6 +298,7 @@ implements java.io.Serializable
  • getAudioBooks

    public void getAudioBooks()
    +
    This method is used to print the each audiobooks contained in the audiobooks attribute of the playlist.
  • @@ -266,6 +308,11 @@ implements java.io.Serializable
  • setId

    public void setId(int id)
    +
    Basic method to set the id of the playlist.
    +
    +
    Parameters:
    +
    id - int
    +
  • @@ -275,6 +322,11 @@ implements java.io.Serializable
  • setName

    public void setName(java.lang.String name)
    +
    Basic method to set the name of the playlist.
    +
    +
    Parameters:
    +
    name - String
    +
  • @@ -284,9 +336,12 @@ implements java.io.Serializable
  • toString

    public java.lang.String toString()
    +
    Basic method to "configure" what does a print of this object actually does.
    Overrides:
    toString in class java.lang.Object
    +
    Returns:
    +
    String, using the object's methods
  • diff --git a/javadoc/Song.html b/javadoc/Song.html index 3f1712f..a9de438 100644 --- a/javadoc/Song.html +++ b/javadoc/Song.html @@ -2,7 +2,7 @@ - + Song @@ -117,10 +117,11 @@ var activeTableTab = "activeTableTab";
    public class Song
     extends MusicalElement
    -
    Song is using instanciating MusicalElement and is Serializable.
    +
    The Song class is used to create songs while extending MusicalElement.
    See Also:
    -
    Serialized Form
    +
    MusicalElement, +Serialized Form
    @@ -144,7 +145,9 @@ extends MusicalEl int duration, java.lang.String content, java.lang.String artist, - Genre genre)  + Genre genre) +
    Constructor method.
    + @@ -163,23 +166,33 @@ extends MusicalEl java.lang.String -getArtist()  +getArtist() +
    This method is used to give the artist of the song.
    + java.lang.String -getGenre()  +getGenre() +
    This method is used to give the genre of the song.
    + void -setArtist(java.lang.String artist)  +setArtist(java.lang.String artist) +
    Basic method to set the artist of the song.
    + void -setGenre(Genre genre)  +setGenre(Genre genre) +
    Basic method to set the genre of the song using the name method from the Genre class.
    + java.lang.String -toString()  +toString() +
    Basic method to "configure" what does a print of this object actually does.
    + @@ -238,6 +262,11 @@ extends MusicalEl
  • getArtist

    public java.lang.String getArtist()
    +
    This method is used to give the artist of the song.
    +
    +
    Returns:
    +
    artist String
    +
  • @@ -247,6 +276,13 @@ extends MusicalEl
  • getGenre

    public java.lang.String getGenre()
    +
    This method is used to give the genre of the song.
    +
    +
    Returns:
    +
    It returns the genre, which is a String because the constructor use the name method of the Genre class.
    +
    See Also:
    +
    Genre
    +
  • @@ -256,6 +292,11 @@ extends MusicalEl
  • setArtist

    public void setArtist(java.lang.String artist)
    +
    Basic method to set the artist of the song.
    +
    +
    Parameters:
    +
    artist - String
    +
  • @@ -265,6 +306,13 @@ extends MusicalEl
  • setGenre

    public void setGenre(Genre genre)
    +
    Basic method to set the genre of the song using the name method from the Genre class.
    +
    +
    Parameters:
    +
    genre - Genre
    +
    See Also:
    +
    Genre
    +
  • @@ -274,9 +322,12 @@ extends MusicalEl
  • toString

    public java.lang.String toString()
    +
    Basic method to "configure" what does a print of this object actually does.
    Overrides:
    toString in class java.lang.Object
    +
    Returns:
    +
    String, using the object's methods
  • diff --git a/javadoc/allclasses-frame.html b/javadoc/allclasses-frame.html index 7b95261..761f06c 100644 --- a/javadoc/allclasses-frame.html +++ b/javadoc/allclasses-frame.html @@ -2,7 +2,7 @@ - + All Classes diff --git a/javadoc/allclasses-noframe.html b/javadoc/allclasses-noframe.html index e1d75f1..d01c0bc 100644 --- a/javadoc/allclasses-noframe.html +++ b/javadoc/allclasses-noframe.html @@ -2,7 +2,7 @@ - + All Classes diff --git a/javadoc/constant-values.html b/javadoc/constant-values.html index 9058d99..ac69117 100644 --- a/javadoc/constant-values.html +++ b/javadoc/constant-values.html @@ -2,7 +2,7 @@ - + Constant Field Values diff --git a/javadoc/deprecated-list.html b/javadoc/deprecated-list.html index 2324e28..76ea693 100644 --- a/javadoc/deprecated-list.html +++ b/javadoc/deprecated-list.html @@ -2,7 +2,7 @@ - + Deprecated List diff --git a/javadoc/help-doc.html b/javadoc/help-doc.html index 7ee1fe6..d5354cd 100644 --- a/javadoc/help-doc.html +++ b/javadoc/help-doc.html @@ -2,7 +2,7 @@ - + API Help diff --git a/javadoc/index-all.html b/javadoc/index-all.html index 9359c45..fd4fc50 100644 --- a/javadoc/index-all.html +++ b/javadoc/index-all.html @@ -2,7 +2,7 @@ - + Index @@ -74,15 +74,15 @@
    addAlbum(Scanner) - Static method in class jMusicHub
    -
    addAlbum is used to add albums thanks to the "a" option
    +
    addAlbum is used to add albums thanks to the "a" option.
    addAudioBook(Scanner) - Static method in class jMusicHub
    -
    addAudioBook is used to add songs thanks to the "l" option
    +
    addAudioBook is used to add songs thanks to the "l" option.
    addPlaylist(Scanner, ArrayList<Song>, ArrayList<AudioBook>) - Static method in class jMusicHub
    -
    addPlaylist is used to add playlist thanks to the "p" option
    +
    addPlaylist is used to add playlist thanks to the "p" option.
    addSong(Song) - Method in class Album
    @@ -90,10 +90,12 @@
    addSong(Scanner) - Static method in class jMusicHub
    -
    addSong is used to add songs thanks to the "c" option
    +
    addSong is used to add songs thanks to the "c" option.
    addSongToAlbum(Scanner, ArrayList<Album>, ArrayList<Song>) - Static method in class jMusicHub
    -
     
    +
    +
    addSongToAlbum is called by the "+" command in order to add a song to an album.
    +
    Album - Class in <Unnamed>
    The album class is used to create albums containing songs added after its creation and the creation of the songs.
    @@ -121,9 +123,13 @@
    The Category enum is used by audiobooks as an attribute.
    contentOfAlbum(ArrayList<Album>) - Static method in class jMusicHub
    -
     
    +
    +
    contentOfAlbum is called by the "AC" command in order to display the content of a chosen album.
    +
    contentOfPlaylist(ArrayList<Playlist>) - Static method in class jMusicHub
    -
     
    +
    +
    contentOfPlaylist is called by the "PC" command in order to display the content of a chosen playlist.
    +
    @@ -131,7 +137,9 @@

    D

    delPlaylist(ArrayList<Playlist>) - Static method in class jMusicHub
    -
     
    +
    +
    delPlaylist is called by the "-" command in order to delete a playlist.
    +
    @@ -157,9 +165,13 @@
    This method is used to give the artist of the album.
    getArtist() - Method in class Song
    -
     
    +
    +
    This method is used to give the artist of the song.
    +
    getAudioBooks() - Method in class Playlist
    -
     
    +
    +
    This method is used to print the each audiobooks contained in the audiobooks attribute of the playlist.
    +
    getAuthor() - Method in class AudioBook
    This method is used to give the author of the audiobook.
    @@ -169,7 +181,9 @@
    This method is used to give the category of the audiobook.
    getContent() - Method in class MusicalElement
    -
     
    +
    +
    This method is used to give the content path of the element.
    +
    getDate() - Method in class Album
    This method is used to give the date of release of the album.
    @@ -179,37 +193,53 @@
    This method is used to give the duration of the album.
    getDuration() - Method in class MusicalElement
    -
     
    +
    +
    This method is used to give the duration of the element.
    +
    getGenre() - Method in class Album
    This method is used for the AG command in jMusicHub.
    getGenre() - Method in class Song
    -
     
    +
    +
    This method is used to give the genre of the song.
    +
    getId() - Method in class Album
    This method is used to give the id of the album.
    getId() - Method in class MusicalElement
    -
     
    +
    +
    This method is used to give the id of the element.
    +
    getId() - Method in class Playlist
    -
     
    +
    +
    This method is used to give the id of the playlist.
    +
    getLanguage() - Method in class AudioBook
    This method is used to give the language of the audiobook.
    getName() - Method in class Playlist
    -
     
    +
    +
    This method is used to give the name of the playlist in uppercase.
    +
    getSongs() - Method in class Album
    -
     
    +
    +
    This method is used to print the each songs contained in the songs attribute of the album.
    +
    getSongs() - Method in class Playlist
    -
     
    +
    +
    This method is used to print the each songs contained in the songs attribute of the playlist.
    +
    getTitle() - Method in class Album
    This method is used to give the title of the album.
    getTitle() - Method in class MusicalElement
    -
     
    +
    +
    This method is used to give the title of the element.
    +
    @@ -218,10 +248,12 @@
    jMusicHub - Class in <Unnamed>
    -
    The jMusicHub class is basically the app.
    +
    The jMusicHub class is our main component.
    jMusicHub() - Constructor for class jMusicHub
    -
     
    +
    +
    Constructor method, it is calling every methods and contains the command prompt.
    +
    @@ -233,17 +265,25 @@
    The Language enum is used by audiobooks as an attribute.
    listAlbumsByDate() - Static method in class jMusicHub
    -
     
    +
    +
    listAlbumsByDate is called by the "AD" command in order to list the albums sorted by the date of release.
    +
    listAlbumsByGenre() - Static method in class jMusicHub
    -
     
    +
    +
    listAlbumsByGenre is called by the "AG" command in order to list the albums sorted by the genre of their songs.
    +
    listAudioBooksByAuthor() - Static method in class jMusicHub
    -
     
    +
    +
    listAudioBooksByAuthor is called by the "BA" command in order to list the audiobooks sorted by authors.
    +
    listById(String) - Static method in class jMusicHub
    list is called when using the "AB", "S", "A" and "P" commands in order to list the elements in respective files.
    listPlaylistsByName() - Static method in class jMusicHub
    -
     
    +
    +
    listPlaylistsByName is called when using the "PN" command in order to list the playlists sorted by their name.
    +
    @@ -251,13 +291,17 @@

    M

    main(String[]) - Static method in class jMusicHub
    -
     
    +
    +
    The main method is used to launch the app.
    +
    MusicalElement - Class in <Unnamed>
    The MusicalElement contains the base of songs and audiobooks.
    MusicalElement(String, int, String) - Constructor for class MusicalElement
    -
     
    +
    +
    Constructor method.
    +
    @@ -265,9 +309,13 @@

    P

    Playlist - Class in <Unnamed>
    -
     
    +
    +
    The Playlist class is used to create playlists containing songs and audiobooks.
    +
    Playlist(String, ArrayList<Song>, ArrayList<AudioBook>) - Constructor for class Playlist
    -
     
    +
    +
    Constructor method.
    +
    @@ -276,10 +324,7 @@
    save(String, ArrayList) - Static method in class jMusicHub
    -
    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.
    +
    save is used by the command "s".
    setArtist(String) - Method in class Album
    @@ -287,50 +332,68 @@
    setArtist(String) - Method in class AudioBook
    -
    Basic method to set the author of audiobook.
    +
    Basic method to set the author of the audiobook.
    setArtist(String) - Method in class Song
    -
     
    +
    +
    Basic method to set the artist of the song.
    +
    setCategory(Category) - Method in class AudioBook
    Basic method to set the category of the audiobook using the name method from the Category class.
    setContent(String) - Method in class MusicalElement
    -
     
    +
    +
    Basic method to set the content path of the element.
    +
    setDate(Date) - Method in class Album
    Basic method to set the date of the album.
    setDuration(int) - Method in class MusicalElement
    -
     
    +
    +
    Basic method to set the duration of the element.
    +
    setGenre(Language) - Method in class AudioBook
    -
    Basic method to set the language of the audiobook using the name method from the Language object.
    +
    Basic method to set the language of the audiobook using the name method from the Language class.
    setGenre(Genre) - Method in class Song
    -
     
    +
    +
    Basic method to set the genre of the song using the name method from the Genre class.
    +
    setId(int) - Method in class Album
    Basic method to set the id of the album.
    setId(int) - Method in class MusicalElement
    -
     
    +
    +
    Basic method to set the id of the element.
    +
    setId(int) - Method in class Playlist
    -
     
    +
    +
    Basic method to set the id of the playlist.
    +
    setName(String) - Method in class Playlist
    -
     
    +
    +
    Basic method to set the name of the playlist.
    +
    setTitle(String) - Method in class Album
    Basic method to set the title of the album.
    setTitle(String) - Method in class MusicalElement
    -
     
    +
    +
    Basic method to set the title of the element.
    +
    Song - Class in <Unnamed>
    -
    Song is using instanciating MusicalElement and is Serializable.
    +
    The Song class is used to create songs while extending MusicalElement.
    Song(String, int, String, String, Genre) - Constructor for class Song
    -
     
    +
    +
    Constructor method.
    +
    @@ -346,9 +409,13 @@
    Basic method to "configure" what does a print of this object actually does.
    toString() - Method in class Playlist
    -
     
    +
    +
    Basic method to "configure" what does a print of this object actually does.
    +
    toString() - Method in class Song
    -
     
    +
    +
    Basic method to "configure" what does a print of this object actually does.
    +
    diff --git a/javadoc/index.html b/javadoc/index.html index 24dcdec..cd70d45 100644 --- a/javadoc/index.html +++ b/javadoc/index.html @@ -2,7 +2,7 @@ - + Generated Documentation (Untitled) @@ -84,7 +84,7 @@ jMusicHub -
    The jMusicHub class is basically the app.
    +
    The jMusicHub class is our main component.
    @@ -95,12 +95,14 @@ Playlist -  + +
    The Playlist class is used to create playlists containing songs and audiobooks.
    + Song -
    Song is using instanciating MusicalElement and is Serializable.
    +
    The Song class is used to create songs while extending MusicalElement.
    diff --git a/javadoc/package-tree.html b/javadoc/package-tree.html index a2f09f5..1c9ff75 100644 --- a/javadoc/package-tree.html +++ b/javadoc/package-tree.html @@ -2,7 +2,7 @@ - + Class Hierarchy diff --git a/javadoc/serialized-form.html b/javadoc/serialized-form.html index d6a9101..447f7be 100644 --- a/javadoc/serialized-form.html +++ b/javadoc/serialized-form.html @@ -2,7 +2,7 @@ - + Serialized Form -- cgit v1.2.3