📄 mylink.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -