/* * Name : MusicalElement * * Description : The MusicalElement contains the base of songs and audiobooks. * * Version : 1.0 * * Date : 28/12/2020 * * Copyright : Aimeric ADJUTOR */ 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; this.content=content; } //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;} /** * 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;} }