Overrode equals method to compare edge's parent and destination vertices.