Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Filmography |
|
| 1.0;1 |
1 | package org.jtheque.films.services.impl.utils; | |
2 | ||
3 | /* | |
4 | * This file is part of JTheque. | |
5 | * | |
6 | * JTheque is free software: you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation, either version 3 of the License. | |
9 | * | |
10 | * JTheque is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
17 | */ | |
18 | ||
19 | import java.util.ArrayList; | |
20 | import java.util.Collection; | |
21 | ||
22 | /** | |
23 | * A filmography. A filmography contain an actor and a list of films in which the actor has played. | |
24 | * | |
25 | * @author Baptiste Wicht | |
26 | */ | |
27 | 0 | public final class Filmography { |
28 | /** | |
29 | * The String representation of the actor. | |
30 | */ | |
31 | private String actor; | |
32 | ||
33 | /** | |
34 | * The films on which the actors has played. | |
35 | */ | |
36 | private Collection<String> films; | |
37 | ||
38 | /** | |
39 | * Return the films of the filmography. | |
40 | * | |
41 | * @return A List containing all the films of the filmography. | |
42 | */ | |
43 | public Iterable<String> getFilms() { | |
44 | 0 | return films; |
45 | } | |
46 | ||
47 | /** | |
48 | * Set the films of the filmography. | |
49 | * | |
50 | * @param films The new List of films to set | |
51 | */ | |
52 | public void setFilms(Collection<String> films) { | |
53 | 0 | this.films = new ArrayList<String>(films); |
54 | 0 | } |
55 | ||
56 | /** | |
57 | * Set the actor of the filmography. | |
58 | * | |
59 | * @param actor The new actor to set. | |
60 | */ | |
61 | public void setActor(String actor) { | |
62 | 0 | this.actor = actor; |
63 | 0 | } |
64 | ||
65 | /** | |
66 | * Return the actor of the filmography. | |
67 | * | |
68 | * @return The actor. | |
69 | */ | |
70 | public String getActor() { | |
71 | 0 | return actor; |
72 | } | |
73 | } |