event.java
来自「发布/订阅系统路由重配算法,可应用于ad hoc环境」· Java 代码 · 共 53 行
JAVA
53 行
/* * project: RebecaSim * package: sim * file: Event.java * * version: 0.1 * date: 03.05.2005 * * This software is part of the diploma thesis "Ein adaptives Brokernetz * für Publish/Subscribe Systeme". */package sim;import util.*;/** * TODO Insert class description here. * * @version 03.05.2005 * @author parzy */public abstract class Event implements Comparable { private double time; private ID id; public Event(){ this.time = -1; this.id = new ID(); } public int compareTo(Object o){ return compareTo((Event)o); } private int compareTo(Event e){ return (this.time<e.time ? -1 : (this.time>e.time ? 1 : this.id.compareTo(e.id))); } public void setTime(double time){ this.time = time; } public double getTime(){ return time; } public abstract void handle(); }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?