Add channel container.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 8 Apr 2013 19:11:01 +0000 (21:11 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 8 Apr 2013 19:11:01 +0000 (21:11 +0200)
src/main/java/net/pterodactylus/xdcc/data/Channel.java [new file with mode: 0644]

diff --git a/src/main/java/net/pterodactylus/xdcc/data/Channel.java b/src/main/java/net/pterodactylus/xdcc/data/Channel.java
new file mode 100644 (file)
index 0000000..59be331
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * XdccDownloader - Channel.java - Copyright © 2013 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.xdcc.data;
+
+/**
+ * Defines a channel in a {@link Network}.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class Channel {
+
+       /** The network this channel belongs to. */
+       private final Network network;
+
+       /** The name of the channel. */
+       private final String name;
+
+       /**
+        * Creates a new channel.
+        *
+        * @param network
+        *              The network the channel belongs to
+        * @param name
+        *              The name of the channel
+        */
+       public Channel(Network network, String name) {
+               this.network = network;
+               this.name = name;
+       }
+
+       //
+       // ACCESSORS
+       //
+
+       /**
+        * Returns the network this channel belongs to
+        *
+        * @return The network this channel belongs to
+        */
+       public Network network() {
+               return network;
+       }
+
+       /**
+        * Returns the name of this channel.
+        *
+        * @return The name of this channel
+        */
+       public String name() {
+               return name;
+       }
+
+}