package algorithms.visibilitygraph;

public class Edge {

    public final int source;
    public final int dest;
    public final float weight;
    
    public Edge(int source, int dest, float weight) {
        this.source = source;
        this.dest = dest;
        this.weight = weight;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + dest;
        return result;
    }

    /**
     * Depends only on destination index.
     */
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Edge other = (Edge) obj;
        if (dest != other.dest)
            return false;
        return true;
    }
}

@@ -580,279 +580,41 @@
     
-if (this == obj)%0A            return true;%0A        if (obj == null)%0A            return false;%0A        if (getClass() != obj.getClass())%0A            return false;%0A        Edge other 
+return (dest =
 = 
+(
 (Edge)
- 
 obj
-;%0A        if (dest != other.dest)%0A            return false;%0A        return true
+).dest)
 ;%0A  

Remove some useless checks in Edge equals method