From 7c23f453d166d396451504e26fbb385afc0c4c13 Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Mon, 28 Dec 2020 17:31:33 +0100 Subject: Finishing javadoc --- MusicalElement.java | 104 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 94 insertions(+), 10 deletions(-) (limited to 'MusicalElement.java') 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;} } -- cgit v1.2.3