aboutsummaryrefslogtreecommitdiffstats
path: root/Playlist.java
diff options
context:
space:
mode:
authorClyhtsuriva <aimeric@adjutor.xyz>2020-12-28 12:39:16 +0100
committerClyhtsuriva <aimeric@adjutor.xyz>2020-12-28 12:39:16 +0100
commitb3ed778f6452211bc4070ba7644ea3247ad8f234 (patch)
treeffec85357c5b048a2ec2c3ac887c88117cc89828 /Playlist.java
parentb5072cf8159adb16ff1826dce27bccb7ab41c141 (diff)
downloadjMusicHub-b3ed778f6452211bc4070ba7644ea3247ad8f234.tar.gz
jMusicHub-b3ed778f6452211bc4070ba7644ea3247ad8f234.tar.bz2
jMusicHub-b3ed778f6452211bc4070ba7644ea3247ad8f234.zip
Repairing playlist
An error occured when no playlists were found AND we wanted to create one. Also populated the objects files to meet the specs of the teach. Creating a run command, might delete later..
Diffstat (limited to '')
-rw-r--r--Playlist.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/Playlist.java b/Playlist.java
index 990aa26..8374c77 100644
--- a/Playlist.java
+++ b/Playlist.java
@@ -17,8 +17,17 @@ public class Playlist implements Serializable {
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.
- public ArrayList<Song> getSongs(){return songs;}
- public ArrayList<AudioBook> getAudioBooks(){return audiobooks;}
+ public void getSongs(){
+ for ( Song s : songs ){
+ System.out.println(s);
+ }
+ }
+ public void getAudioBooks(){
+ for (AudioBook b : audiobooks ){
+ System.out.println(b);
+ }
+
+ }
public void setId(int id){this.id=id;}
public void setName(){this.name=name;}