added gitignore
[clientserver.git] / Channel.java
blobb47819e77519153acf952d6149a01dbb5bad4adc
1 /*
2 * @(#)Channel.java
3 * Time-stamp: "2007-10-02 15:24:38 anton"
4 */
6 import java.util.Collection;
7 import java.util.Hashtable;
9 /**
10 * Channel
12 * @author "Anton Johansson" <anton.johansson@gmail.com>
14 public class Channel {
15 private String channelName;
16 private Hashtable<String, User> users;
18 public Channel(String channelName) {
19 this.channelName = channelName;
20 this.users = new Hashtable<String, User>();
23 public void joinUser(User user) {
24 users.put(user.getNick(), user);
27 public void leaveUser(User user) {
28 users.remove(user.getNick());
31 public String getName() {
32 return this.channelName;
35 public Collection<User> getUsers() {
36 return this.users.values();