Ignore:
Timestamp:
2019-01-06T20:22:48+01:00 (6 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/tools/RotationAngle.java

    r13623 r14654  
    22package org.openstreetmap.josm.tools;
    33
     4import java.util.List;
    45import java.util.Locale;
    56
    67import org.openstreetmap.josm.data.osm.IPrimitive;
    78import org.openstreetmap.josm.data.osm.Node;
    8 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    99import org.openstreetmap.josm.data.osm.Way;
    1010
     
    2828            }
    2929            final Node n = (Node) p;
    30             final SubclassFilteredCollection<OsmPrimitive, Way> ways = Utils.filteredCollection(n.getReferrers(), Way.class);
     30            final List<Way> ways = n.getParentWays();
    3131            if (ways.isEmpty()) {
    3232                return 0;
Note: See TracChangeset for help on using the changeset viewer.