projects
/
IRC.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Use a hashmap to map strings to rooms. So now we can have an unbounded number of...
[IRC.git]
/
Robust
/
src
/
Benchmarks
/
Chat
/
RoomObject.java
1
public class RoomObject {
2
flag Initialized;
3
HashMap rooms;
4
public RoomObject() {
5
rooms=new HashMap();
6
}
7
8
Room getChatRoom(String name) {
9
if (rooms.containsKey(name))
10
return (Room) rooms.get(name);
11
Room r=new Room(name);
12
rooms.put(name, r);
13
return r;
14
}
15
}