Changeset 13667 in josm for trunk/src/org
- Timestamp:
- 2018-04-23T22:17:10+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/IPrimitive.java
r13665 r13667 364 364 365 365 /** 366 * Determines if this object is a relation and behaves as a multipolygon. 367 * @return {@code true} if it is a real multipolygon or a boundary relation 368 * @since 13667 369 */ 370 default boolean isMultipolygon() { 371 return false; 372 } 373 374 /** 366 375 * true if this object has direction dependent tags (e.g. oneway) 367 376 * @return {@code true} if this object has direction dependent tags -
trunk/src/org/openstreetmap/josm/data/osm/IRelation.java
r13665 r13667 54 54 return formatter.format(this); 55 55 } 56 57 /** 58 * Determines if this relation is a boundary. 59 * @return {@code true} if a boundary relation 60 */ 61 default boolean isBoundary() { 62 return "boundary".equals(get("type")); 63 } 64 65 @Override 66 default boolean isMultipolygon() { 67 return "multipolygon".equals(get("type")) || isBoundary(); 68 } 56 69 } -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r13665 r13667 1351 1351 1352 1352 /** 1353 * Determines if this object is a relation and behaves as a multipolygon.1354 * @return {@code true} if it is a real mutlipolygon or a boundary relation1355 * @since 107161356 */1357 public boolean isMultipolygon() {1358 return false;1359 }1360 1361 /**1362 1353 * If necessary, extend the bbox to contain this primitive 1363 1354 * @param box a bbox instance -
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r13665 r13667 41 41 42 42 /** 43 * 43 * Sets members of the relation. 44 44 * @param members Can be null, in that case all members are removed 45 45 * @since 1925 … … 430 430 } 431 431 432 /**433 * Determines if this relation is a boundary.434 * @return {@code true} if a boundary relation435 */436 public boolean isBoundary() {437 return "boundary".equals(get("type"));438 }439 440 @Override441 public boolean isMultipolygon() {442 return "multipolygon".equals(get("type")) || isBoundary();443 }444 445 432 @Override 446 433 public BBox getBBox() {
Note:
See TracChangeset
for help on using the changeset viewer.