Add bots and packs.
[xudocci.git] / src / main / java / net / pterodactylus / xdcc / data / Pack.java
1 /*
2  * XdccDownloader - Pack.java - Copyright © 2013 David Roden
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 package net.pterodactylus.xdcc.data;
19
20 /**
21  * A pack is a downloadable file offered by a {@link Bot}.
22  *
23  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
24  */
25 public class Pack {
26
27         /** The ID of the pack. */
28         private final String id;
29
30         /** The size of the pack. */
31         private final String size;
32
33         /** The name of the pack. */
34         private final String name;
35
36         /**
37          * Creates a new pack.
38          *
39          * @param id
40          *              The ID of the pack
41          * @param size
42          *              The size of the pack
43          * @param name
44          *              The name of the pack
45          */
46         public Pack(String id, String size, String name) {
47                 this.id = id;
48                 this.size = size;
49                 this.name = name;
50         }
51
52         //
53         // ACCESSORS
54         //
55
56         /**
57          * Returns the ID of the pack. The ID is only guaranteed to be unique within a
58          * single {@link Bot}.
59          *
60          * @return The ID of the pack
61          */
62         public String id() {
63                 return id;
64         }
65
66         /**
67          * Returns the size of the pack. The size can contain decimal fractions and
68          * unit denotifiers, such as “1.2G”.
69          *
70          * @return The size of the pack
71          */
72         public String size() {
73                 return size;
74         }
75
76         /**
77          * Returns the name of the pack. This is usually the name of the single file
78          * that makes up this pack.
79          *
80          * @return The name of the pack
81          */
82         public String name() {
83                 return name;
84         }
85
86 }