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

📄 linkproperties.java

📁 p2p仿真
💻 JAVA
字号:
/** * @(#)LinkProperties.java	ver 1.2  6/20/2005 * * Modified by Weishuai Yang (wyang@cs.binghamton.edu).  *  * this file is based on KOM / LetsQoS Topology Conversion Tools */package gps.network.graph;/** * link properties * @author Oliver Heckmann */public class LinkProperties {    /**     * distance     */	double distance = 0.0;	/**	 * bandwidth	 */	double bandwidth = 0.0;	/**	 * cost	 */	double costs = 0.0;	/**	 * delay	 */	double delay = 0.0;	/** 	 * link type	 */	int type=0;	/**	 * link label	 */	String label;	/**	 * directional informaiton	 */	public boolean unidirectional = false;					/** Creates new LinkProperties with zero bandwidth, delay etc.	 */	public LinkProperties() {	}		/** Creates new LinkProperties	 * @param bandwidth bandwidth	 * @param costs costs	 * @param delay delay	 */	public LinkProperties(double distance, double bandwidth, double costs, double delay) {		this.distance = distance;		this.bandwidth = bandwidth;		this.costs = costs;		this.delay = delay;	}	/**	 * gets link type	 * @return type	 */	public int getType() {		return type;	}	/**	 * sets link type	 * @param type new type	 */	public void setType(int type) {		this.type = type;	}		/**	 * gets bandwidth	 * @return bandwidth	 */	public double getBandwidth() {		return bandwidth;	}	/**	 * sets bandwidth	 * @param bandwidth new bandwidth	 */	public void setBandwidth(double bandwidth) {		this.bandwidth = bandwidth;	}	/**	 * gets label	 * @return label	 */	public String getLabel() {		return label;	}	/**	 * sets label	 * @param label new label	 */	public void setLabel(String label) {		this.label = label;	}	/**	 * gets dierctional informaiton	 * @return true if directed, otherwise false	 */	public boolean getDirection() {		return unidirectional;	}		/**	 * sets directional information	 * @param unidirectional true if directed, otherwise false	 */	public void setDirection(boolean unidirectional) {		this.unidirectional = unidirectional;	}	/**	 * gets distance	 * @return distance	 */	public double getDistance() {		return distance;	}	/**	 * sets distance	 * @param distance new distance	 */	public void setDistance(double distance) {		this.distance = distance;	}	/**	 * gets costs	 * @return costs	 */	public double getCosts() {		return costs;	}	/**	 * sets costs	 * @param costs new costs	 */	public void setCosts(double costs) {		this.costs = costs;	}	/**	 * gets delay	 * @return delay	 */	public double getDelay() {		return delay;	}	/**	 * sets delay	 * @param delay new delay	 */	public void setDelay(double delay) {		this.delay = delay;	}	}

⌨️ 快捷键说明

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