Compares two edges by weight. Note that compareTo() is not consistent with equals(), which uses the reference equality implementation inherited from Object. @param that the other edge @return a negative integer, zero, or positive integer depending on whether the wei
(Edge that)
| 92 | * argument edge |
| 93 | */ |
| 94 | @Override |
| 95 | public int compareTo(Edge that) { |
| 96 | return Double.compare(this.weight, that.weight); |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Returns a string representation of this edge. |