Mercurial > hg > RemoteEditor > REPSessionManager
comparison rep/EditorList.java @ 391:3b0a5a55e3ee
24
author | one@firefly.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Mon, 10 Nov 2008 22:25:14 +0900 |
parents | 4b87f89b3afd |
children |
comparison
equal
deleted
inserted
replaced
390:aa07134fea32 | 391:3b0a5a55e3ee |
---|---|
1 package rep; | 1 package rep; |
2 | 2 |
3 import java.util.HashMap; | 3 import java.util.HashMap; |
4 | 4 |
5 import rep.channel.REPSocketChannel; | |
5 import rep.handler.REPNode; | 6 import rep.handler.REPNode; |
6 | 7 |
7 public class EditorList extends HashMap<Integer,REPNode> { | 8 public class EditorList extends HashMap<Integer,REPNode> { |
8 | 9 |
9 /** | 10 /** |
25 | 26 |
26 public boolean hasEid(int eid) { | 27 public boolean hasEid(int eid) { |
27 return containsKey(eid); | 28 return containsKey(eid); |
28 } | 29 } |
29 | 30 |
30 | 31 public REPNode editorByChannel(REPSocketChannel<REPCommand>channel) { |
32 for(REPNode e:this.values()) { | |
33 if (e.channel==channel) | |
34 return e; | |
35 } | |
36 return null; | |
37 } | |
31 } | 38 } |