Ignore:
Timestamp:
2009-12-03T20:26:00+01:00 (14 years ago)
Author:
Gubaer
Message:

Removed BackReferenceDataSet and CollectBackReferenceVisitor because we now have referrer support in OsmPrimitive.
This could cause some problems in the next few days. I'm sure I didn't test every possibly affected feature.

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
1 added
2 deleted
1 edited

Legend:

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

    r2512 r2565  
    149149    }
    150150
     151    /**
     152     * Replies the collection of referring primitives for the primitives in <code>primitives</code>.
     153     *
     154     * @param primitives the collection of primitives.
     155     * @return the collection of referring primitives for the primitives in <code>primitives</code>;
     156     * empty set if primitives is null or if there are no referring primitives
     157     */
     158    static public Set<OsmPrimitive> getReferrer(Collection<? extends OsmPrimitive> primitives) {
     159        HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>();
     160        if (primitives == null || primitives.isEmpty()) return ret;
     161        for (OsmPrimitive p: primitives) {
     162            ret.addAll(p.getReferrers());
     163        }
     164        return ret;
     165    }
     166
     167
    151168    /* mappaint data */
    152169    public ElemStyle mappaintStyle = null;
Note: See TracChangeset for help on using the changeset viewer.