| Edge.java |
package graphics.graph;
class Edge {
private int from;
private int to;
private double len;
public int getFrom() {
return from;
}
public boolean equals(Edge e) {
if (e.from == from) return true;
if (e.to == to) return true;
//if (e.from == to) return true;
//if (e == this) return true;
return false;
}
public void setFrom(int _from) {
from = _from;
}
public int getTo() {
return to;
}
public void setTo(int _to) {
to = _to;
}
public double getLen() {
return len;
}
public void setLen(double _len) {
len = _len;
}
}