@Override public boolean equals (Object other) {
            Edge<?> e = (Edge<?>) other; // warning if use Edge<N> - unchecked method invocation
            if (other == null) {return false;}
            if (this.getClass() != other.getClass()) {return false;}
            if (!this.src.equals(e.src)) {return false;}
            if (!this.dst.equals(e.dst)) {return false;}
            if (this.cost != e.cost) {return false;}
            return true;
        }