File tree Expand file tree Collapse file tree
src/main/java/org/openstreetmap/josm/plugins/pt_assistant/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import org .openstreetmap .josm .data .osm .Node ;
55import org .openstreetmap .josm .data .osm .OsmPrimitive ;
66import org .openstreetmap .josm .data .osm .Relation ;
7+ import org .openstreetmap .josm .tools .Utils ;
78
89/**
910 * Utils class for stop areas
@@ -69,12 +70,8 @@ public static boolean verifyStopAreaPlatform(final OsmPrimitive p) {
6970 * @return true if the object part of stop area relation, false otherwise.
7071 */
7172 public static boolean verifyIfMemberOfStopArea (final OsmPrimitive member ) {
72- for (Relation parentRelation : OsmPrimitive .getFilteredList (member .getReferrers (), Relation .class )) {
73- if (StopUtils .isStopArea (parentRelation )) {
74- return true ;
75- }
76- }
77- return false ;
73+ return Utils .filteredCollection (member .getReferrers (), Relation .class ).stream ()
74+ .anyMatch (StopUtils ::isStopArea );
7875 }
7976
8077}
You can’t perform that action at this time.
0 commit comments