3 * Time-stamp: "2007-10-02 15:24:38 anton"
6 import java
.util
.Collection
;
7 import java
.util
.Hashtable
;
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();