Ignore:
Timestamp:
2019-01-06T20:22:48+01:00 (5 years ago)
Author:
simon04
Message:

Deprecate OsmPrimitive.getFilteredList/getFilteredSet in favour of Stream

Most use-cases involved filtering referring primitives. This can now be
accomplished using OsmPrimitive.referrers involving the Stream API and
thus avoids creation of intermediate collections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/SplitWayCommand.java

    r14143 r14654  
    88import java.util.Arrays;
    99import java.util.Collection;
     10import java.util.Collections;
    1011import java.util.HashSet;
    1112import java.util.Iterator;
     
    297298        // now copy all relations to new way also
    298299
    299         for (Relation r : OsmPrimitive.getFilteredList(way.getReferrers(), Relation.class)) {
     300        for (Relation r : OsmPrimitive.getParentRelations(Collections.singleton(way))) {
    300301            if (!r.isUsable()) {
    301302                continue;
Note: See TracChangeset for help on using the changeset viewer.