filter.java

来自「发布/订阅系统路由重配算法,可应用于ad hoc环境」· Java 代码 · 共 51 行

JAVA
51
字号
/* * Created on May 4, 2005 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */package broker;import com.Notification;import sim.*;/** * @author parzy * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */public class Filter {		private Job job;			public Filter(Job job){		this.job = job;	}		public boolean equals(Object o){		return ((o != null) || (o instanceof Filter)) ? 			this.job.equals(((Filter)o).job) :			false;	}		public Job getJob(){		return job;	}		public boolean match(Notification n){		return this.job.equals(n.getJob());	}	public boolean identical(Filter f){		return this.job.equals(f.getJob());		}		public boolean covers(Filter f){		return this.job.equals(f.getJob());	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?