Changeset 2352 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2009-10-30T22:23:12+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r2348 r2352 628 628 629 629 public Set<Relation> getReferringRelations(Collection<? extends OsmPrimitive> primitives) { 630 return this.getReferringRelations(new HashSet<OsmPrimitive>(primitives)); 631 } 632 public Set<Relation> getReferringRelations(Set<? extends OsmPrimitive> referred) { 630 633 HashSet<Relation> ret = new HashSet<Relation>(); 631 if (primitives == null) return ret; 632 Set<? extends OsmPrimitive> referred; 633 if (primitives instanceof Set<?>) { 634 referred = (Set<? extends OsmPrimitive>)primitives; 635 } else { 636 referred = new HashSet<OsmPrimitive>(primitives); 637 } 634 if (referred == null) return ret; 638 635 referred.remove(null); // just in case - remove null element from primitives 639 636 for (Relation r: relations) {
Note:
See TracChangeset
for help on using the changeset viewer.