From: David ‘Bombe’ Roden Date: Mon, 8 Apr 2013 19:11:01 +0000 (+0200) Subject: Add channel container. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=3404d481880e426bce9a75f727ba065aea427de2;p=xudocci.git Add channel container. --- 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 index 0000000..59be331 --- /dev/null +++ b/src/main/java/net/pterodactylus/xdcc/data/Channel.java @@ -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 . + */ + +package net.pterodactylus.xdcc.data; + +/** + * Defines a channel in a {@link Network}. + * + * @author David ‘Bombe’ Roden + */ +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; + } + +}