mylink.java
来自「软件测试工具包 Java源代码 软件测试工具包 Java源代码」· Java 代码 · 共 25 行
JAVA
25 行
package myJung2Test.views;
public class MyLink {
static int edgeCount=0;
double capacity; // should be private
double weight; // should be private for good practice
int id;
public MyLink(double weight, double capacity) {
this.id = edgeCount++; // This is defined in the outer class.
this.weight = weight;
this.capacity = capacity;
}
public String toString() { // Always good for debugging
return "MyEdge"+id;
}
public double getWeight(){
return weight;
}
// public double doubleValue() {
// return weight;
// }
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?