public class Album
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Album(java.lang.String title,
int duration,
java.lang.String artist,
java.util.Date date,
java.util.ArrayList<Song> songs)
Constructor method.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSong(Song song)
Mehtod to add songs, of the Song class, to the album's arrayList.
|
java.lang.String |
getArtist()
This method is used to give the artist of the album.
|
java.util.Date |
getDate()
This method is used to give the date of release of the album.
|
int |
getDuration()
This method is used to give the duration of the album.
|
java.lang.String |
getGenre()
This method is used for the AG command in jMusicHub.
|
int |
getId()
This method is used to give the id of the album.
|
void |
getSongs() |
java.lang.String |
getTitle()
This method is used to give the title of the album.
|
void |
setArtist(java.lang.String artist)
Basic method to set the artist of the album.
|
void |
setDate(java.util.Date date)
Basic method to set the date of the album.
|
void |
setId(int id)
Basic method to set the id of the album.
|
void |
setTitle(java.lang.String title)
Basic method to set the title of the album.
|
java.lang.String |
toString()
Basic method to "configure" what does a print of this object actually does.
|
public Album(java.lang.String title,
int duration,
java.lang.String artist,
java.util.Date date,
java.util.ArrayList<Song> songs)
title - Stringduration - int, calculated with the actual duration of the object's songsartist - Stringdate - Datesongs - ArrayListMusicalElementpublic int getId()
public java.lang.String getTitle()
public int getDuration()
MusicalElement.getDuration()public java.lang.String getArtist()
public java.util.Date getDate()
public void getSongs()
public java.lang.String getGenre()
Song.getGenre(),
jMusicHub.listAlbumsByGenre()public void setId(int id)
id - intpublic void setTitle(java.lang.String title)
title - Stringpublic void setArtist(java.lang.String artist)
artist - Stringpublic void setDate(java.util.Date date)
date - Datepublic void addSong(Song song)
song - Songpublic java.lang.String toString()
toString in class java.lang.Object