Changeset 13669 in josm for trunk/src/org
- Timestamp:
- 2018-04-23T22:40:10+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/INode.java
r13666 r13669 43 43 void setEastNorth(EastNorth eastNorth); 44 44 45 /** 46 * Check whether this node connects 2 ways. 47 * 48 * @return true if isReferredByWays(2) returns true 49 * @see #isReferredByWays(int) 50 * @since 13669 51 */ 52 default boolean isConnectionNode() { 53 return isReferredByWays(2); 54 } 55 56 /** 57 * Return true, if this primitive is referred by at least n ways 58 * @param n Minimal number of ways to return true. Must be positive 59 * @return {@code true} if this primitive is referred by at least n ways 60 * @since 13669 61 */ 62 boolean isReferredByWays(int n); 63 45 64 @Override 46 65 default int compareTo(IPrimitive o) { -
trunk/src/org/openstreetmap/josm/data/osm/Node.java
r13666 r13669 325 325 } 326 326 327 /** 328 * Check whether this node connects 2 ways. 329 * 330 * @return true if isReferredByWays(2) returns true 331 * @see #isReferredByWays(int) 332 */ 333 public boolean isConnectionNode() { 334 return isReferredByWays(2); 327 @Override 328 public boolean isReferredByWays(int n) { 329 return isNodeReferredByWays(n); 335 330 } 336 331 -
trunk/src/org/openstreetmap/josm/data/osm/NodeData.java
r13173 r13669 99 99 visitor.visit(this); 100 100 } 101 102 @Override 103 public boolean isReferredByWays(int n) { 104 return false; 105 } 101 106 } -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r13667 r13669 1024 1024 1025 1025 /** 1026 Return true, if this primitive isreferred by at least n ways1027 @param n Minimal number of ways to return true. Must be positive1026 * Return true, if this primitive is a node referred by at least n ways 1027 * @param n Minimal number of ways to return true. Must be positive 1028 1028 * @return {@code true} if this primitive is referred by at least n ways 1029 1029 */ 1030 p ublic final boolean isReferredByWays(int n) {1030 protected final boolean isNodeReferredByWays(int n) { 1031 1031 // Count only referrers that are members of the same dataset (primitive can have some fake references, for example 1032 1032 // when way is cloned
Note:
See TracChangeset
for help on using the changeset viewer.