Changeset 12348 in josm for trunk/src/org/openstreetmap/josm/command/Command.java
- Timestamp:
- 2017-06-08T23:41:02+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/Command.java
r11243 r12348 338 338 } 339 339 340 /** 341 * Ensures that all primitives that are participating in this command belong to the affected data set. 342 * 343 * Commands may use this in their update methods to check the consitency of the primitives they operate on. 344 * @throws AssertionError if no {@link DataSet} is set or if any primitive does not belong to that dataset. 345 */ 346 protected void ensurePrimitivesAreInDataset() { 347 for (OsmPrimitive primitive : this.getParticipatingPrimitives()) { 348 if (primitive.getDataSet() != this.getAffectedDataSet()) { 349 throw new AssertionError("Primitive is of wrong data set for this command: " + primitive); 350 } 351 } 352 } 353 340 354 @Override 341 355 public int hashCode() {
Note:
See TracChangeset
for help on using the changeset viewer.