Mercurial > hg > RemoteEditor > REPSessionManager
view rep/EditorList.java @ 502:49b689b17d06 default tip
merged TestEditor to REPEditor
author | suika6039 |
---|---|
date | Tue, 21 Dec 2010 18:01:15 +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; } }