Ignore:
Timestamp:
2016-11-09T23:11:04+01:00 (3 years ago)
Author:
bastiK
Message:

applied #13307 - various improvements to MultipolygonTest (patch by Gerd Petermann)

File:
1 edited

Legend:

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

    r9371 r11227  
    115115    }
    116116
     117    /**
     118     * Checks whether this segment and another way segment share the same points
     119     * @param s2 The other segment
     120     * @return true if other way segment is the same or reverse
     121     */
     122    public boolean isSimilar(WaySegment s2) {
     123        if (getFirstNode().equals(s2.getFirstNode()) && getSecondNode().equals(s2.getSecondNode()))
     124            return true;
     125        if (getFirstNode().equals(s2.getSecondNode()) && getSecondNode().equals(s2.getFirstNode()))
     126            return true;
     127        return false;
     128    }
     129
    117130    @Override
    118131    public String toString() {
Note: See TracChangeset for help on using the changeset viewer.