Mercurial > hg > RemoteEditor > REPSessionManager
view rep/EditorList.java @ 424:1e58479b4170
TestEditor selectionKeys fix.
author | one |
---|---|
date | Thu, 31 Dec 2009 23:00:55 +0900 |
parents | 3b0a5a55e3ee |
children |
line wrap: on
line source
package rep; import java.util.HashMap; import rep.channel.REPSocketChannel; import rep.handler.REPNode; public class EditorList extends HashMap<Integer,REPNode> { /** * */ private static final long serialVersionUID = 1L; private int eid_root=0; public void add(REPNode fw) { put(fw.getEID(),fw); } public int newEid() { return ++eid_root; } public boolean hasEid(int eid) { return containsKey(eid); } public REPNode editorByChannel(REPSocketChannel<REPCommand>channel) { for(REPNode e:this.values()) { if (e.channel==channel) return e; } return null; } }