Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
MessageFile |
|
| 1.0;1 |
1 | package org.jtheque.core.managers.message; | |
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 org.jtheque.utils.collections.CollectionUtils; | |
20 | ||
21 | import java.util.Collection; | |
22 | ||
23 | /** | |
24 | * @author Baptiste Wicht | |
25 | * <p/> | |
26 | * Created by IntelliJ IDEA. | |
27 | * User: wichtounet | |
28 | * Date: 20 mars 2009 | |
29 | * Time: 12:39:50 | |
30 | */ | |
31 | 0 | public final class MessageFile { |
32 | /** | |
33 | * The source of the messages. | |
34 | */ | |
35 | private String source; | |
36 | ||
37 | /** | |
38 | * The messages. | |
39 | */ | |
40 | private Collection<Message> messages; | |
41 | ||
42 | /** | |
43 | * Return the source of the messages. | |
44 | * | |
45 | * @return The source off the messages. | |
46 | */ | |
47 | public String getSource() { | |
48 | 0 | return source; |
49 | } | |
50 | ||
51 | /** | |
52 | * Set the source of the messages. | |
53 | * | |
54 | * @param source The source of the messages. | |
55 | */ | |
56 | public void setSource(String source) { | |
57 | 0 | this.source = source; |
58 | 0 | } |
59 | ||
60 | /** | |
61 | * Return all the messages of the file. | |
62 | * | |
63 | * @return A List containing all the messages of the file. | |
64 | */ | |
65 | public Collection<Message> getMessages() { | |
66 | 0 | return messages; |
67 | } | |
68 | ||
69 | /** | |
70 | * Set the messages. | |
71 | * | |
72 | * @param messages The messages of the file. | |
73 | */ | |
74 | public void setMessages(Collection<Message> messages) { | |
75 | 0 | this.messages = CollectionUtils.copyOf(messages); |
76 | 0 | } |
77 | ||
78 | @Override | |
79 | public String toString() { | |
80 | 0 | return "MessageFile{" + |
81 | "source='" + source + '\'' + | |
82 | ", messages=" + messages + | |
83 | '}'; | |
84 | } | |
85 | } |