aboutsummaryrefslogtreecommitdiff
path: root/MusicalElement.java
blob: fee560e70b2b7ea3fa4dba78434978f2a052d6ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
 * 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;}
}