?? edge.java
字號:
package adjacencyListGragh;
/* It is a Directed Edge class,
* because the edge is distinguish
* it is easy to code*/
public class Edge {
private Vertex origin;
private Vertex destiny;
private Object element;
public boolean printed = false;
public Edge(){
this.origin = null;
this.destiny = null;
this.element = null;
}
public Edge(Object element){
this.origin = null;
this.destiny = null;
this.element = element;
}
public Edge(Vertex origin, Vertex destiny){
this.origin = origin;
this.destiny = destiny;
this.element = null;
}
public Edge(Vertex origin, Vertex destiny, Object element){
this.origin = origin;
this.destiny = destiny;
this.element = element;
}
public Vertex getOriginVertex(){
return this.origin;
}
public void setOriginVertex(Vertex origin){
this.origin = origin;
}
public Vertex getDestinyVertex(){
return this.destiny;
}
public void setDestinyVertex(Vertex destiny){
this.destiny = destiny;
}
public Object getElement(){
return this.element;
}
public void setElement(Object element){
this.element = element;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -