unsubscription.java
来自「发布/订阅系统路由重配算法,可应用于ad hoc环境」· Java 代码 · 共 60 行
JAVA
60 行
/* * Created on May 4, 2005 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */package com;import java.util.*;import broker.Filter;/** * @author parzy * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */public class Unsubscription extends Subscription implements Cloneable { private LinkedList uncoveredFilters = new LinkedList(); public Unsubscription(Filter filter){ super(filter); } public Unsubscription(Filter filter, int type){ super(filter, type); } public Unsubscription(Filter filter, Collection uncoveredFilters){ super(filter); this.uncoveredFilters.addAll(uncoveredFilters); } public Unsubscription(Filter filter, Collection uncoveredFilters, int type){ super(filter, type); this.uncoveredFilters.addAll(uncoveredFilters); } public Collection getUncoveredFilters(){ return uncoveredFilters; } public void addUncoveredFilter(Filter filter){ uncoveredFilters.add(filter); } public Object clone(){ Unsubscription u; // the cloned unsubscription LinkedList l; // a deep copy of the uncovered filter list u = (Unsubscription)super.clone(); l = new LinkedList(); l.addAll(u.getUncoveredFilters()); u.uncoveredFilters = l; return u; } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?