Ignore:
Timestamp:
2014-01-04T01:51:27+01:00 (10 years ago)
Author:
Don-vip
Message:

fix #9523 - validator: Only raise "Way contains segment twice" error if at least two nodes are found twice

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/WaySegment.java

    r6580 r6619  
    88 */
    99public final class WaySegment implements Comparable<WaySegment> {
     10   
    1011    /**
    1112     * The way.
     
    1920    public int lowerIndex;
    2021
     22    /**
     23     * Constructs a new {@code WaySegment}.
     24     * @param w The way
     25     * @param i The node lower index
     26     */
    2127    public WaySegment(Way w, int i) {
    2228        way = w;
     
    5157    }
    5258
    53     @Override public boolean equals(Object o) {
     59    @Override
     60    public boolean equals(Object o) {
    5461        return o instanceof WaySegment
    5562            && ((WaySegment) o).way == way
     
    5764    }
    5865
    59     @Override public int hashCode() {
     66    @Override
     67    public int hashCode() {
    6068        return way.hashCode() ^ lowerIndex;
    6169    }
     
    8391                s2.getSecondNode().getEastNorth().east(), s2.getSecondNode().getEastNorth().north());
    8492    }
     93
     94    @Override
     95    public String toString() {
     96        return "WaySegment [way=" + way.getId() + ", lowerIndex=" + lowerIndex + "]";
     97    }
    8598}
Note: See TracChangeset for help on using the changeset viewer.