Ignore:
Timestamp:
2018-05-21T19:53:31+02:00 (6 years ago)
Author:
Don-vip
Message:

add IPrimitive.getReferrers(boolean allowWithoutDataset)

File:
1 edited

Legend:

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

    r13807 r13808  
    416416     * @since 13764
    417417     */
    418     List<? extends IPrimitive> getReferrers();
     418    default List<? extends IPrimitive> getReferrers() {
     419        return getReferrers(false);
     420    }
     421
     422    /**
     423     * Find primitives that reference this primitive. Returns only primitives that are included in the same
     424     * dataset as this primitive. <br>
     425     *
     426     * For example following code will add wnew as referer to all nodes of existingWay, but this method will
     427     * not return wnew because it's not part of the dataset <br>
     428     *
     429     * <code>Way wnew = new Way(existingWay)</code>
     430     *
     431     * @param allowWithoutDataset If true, method will return empty list if primitive is not part of the dataset. If false,
     432     * exception will be thrown in this case
     433     *
     434     * @return a collection of all primitives that reference this primitive.
     435     * @since 13808
     436     */
     437    List<? extends IPrimitive> getReferrers(boolean allowWithoutDataset);
    419438
    420439    /**
Note: See TracChangeset for help on using the changeset viewer.