⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 event.java

📁 p2p仿真器。开发者可以工作在覆盖层中进行创造和测试逻辑算法或者创建和测试新的服务。PlanetSim还可以将仿真代码平稳转换为在Internet上的实验代码
💻 JAVA
字号:
/*
 * Created on 01-dic-2003
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package planet.simulate;

import planet.commonapi.Id;

/**
 * @author Pedro Garc韆
 * @author Carles Pairot
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class Event implements IEvent, java.io.Serializable {
  private Id from;
  private Id to;
  private int type;
  private int times;
  private int time;


  public Event (Id from, Id to,int type, int times) {
    this.from = from;
    this.to = to;
    this.type = type;
    this.times = times;
  }

  public Event (Id from, Id to,int type, int times, int time) {
    this.from = from;
    this.to = to;
    this.type = type;
    this.times = times;
    this.time = time;
  }

  /* (non-Javadoc)
   * @see planet.IEvent#getFrom()
   */
  public Id getFrom() {
    return from;
  }

  /* (non-Javadoc)
   * @see planet.IEvent#getTo()
   */
  public Id getTo() {
    return to;
  }

  /* (non-Javadoc)
   * @see planet.IEvent#getType()
   */
  public int getType() {
    return type;
  }

  /* (non-Javadoc)
   * @see planet.IEvent#getTimes()
   */
  public int getTimes() {
    return times;
  }

  public int getTime() {
    return time;
  }
  
  public String toString() {
  	return "From: "+this.from+"; To:"+this.to+"; Type:"+Globals.typeToString(this.type)+"; Times:"+this.times+"; Time:"+this.time+"\n";
  }
}

⌨️ 快捷键说明

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