diff 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
line wrap: on
line diff
--- a/rep/EditorList.java	Mon Nov 10 22:24:34 2008 +0900
+++ b/rep/EditorList.java	Mon Nov 10 22:25:14 2008 +0900
@@ -2,6 +2,7 @@
 
 import java.util.HashMap;
 
+import rep.channel.REPSocketChannel;
 import rep.handler.REPNode;
 
 public class EditorList extends HashMap<Integer,REPNode> {
@@ -27,5 +28,11 @@
 		return containsKey(eid);
 	}
 
-
+	public REPNode editorByChannel(REPSocketChannel<REPCommand>channel) {
+		for(REPNode e:this.values()) {
+			if (e.channel==channel)
+				return e;
+		}
+		return null;
+	}
 }