Class AggregatePrimitivesVisitor
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.util.AggregatePrimitivesVisitor
-
- All Implemented Interfaces:
OsmPrimitiveVisitor
public class AggregatePrimitivesVisitor extends Object implements OsmPrimitiveVisitor
A visitor that aggregates all primitives it visits.The primitives are sorted according to their type: first nodes, then ways.
-
-
Field Summary
Fields Modifier and Type Field Description private Collection<OsmPrimitive>
aggregatedData
Aggregated data
-
Constructor Summary
Constructors Constructor Description AggregatePrimitivesVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<OsmPrimitive>
visit(Collection<OsmPrimitive> data)
Visits a collection of primitivesvoid
visit(Node n)
Visiting call for points.void
visit(Relation r)
Visiting call for relations.void
visit(Way w)
Visiting call for lines.
-
-
-
Field Detail
-
aggregatedData
private final Collection<OsmPrimitive> aggregatedData
Aggregated data
-
-
Constructor Detail
-
AggregatePrimitivesVisitor
public AggregatePrimitivesVisitor()
-
-
Method Detail
-
visit
public Collection<OsmPrimitive> visit(Collection<OsmPrimitive> data)
Visits a collection of primitives- Parameters:
data
- The collection of primitives- Returns:
- The aggregated primitives
-
visit
public void visit(Node n)
Description copied from interface:OsmPrimitiveVisitor
Visiting call for points.- Specified by:
visit
in interfaceOsmPrimitiveVisitor
- Parameters:
n
- The node to inspect.
-
visit
public void visit(Way w)
Description copied from interface:OsmPrimitiveVisitor
Visiting call for lines.- Specified by:
visit
in interfaceOsmPrimitiveVisitor
- Parameters:
w
- The way to inspect.
-
visit
public void visit(Relation r)
Description copied from interface:OsmPrimitiveVisitor
Visiting call for relations.- Specified by:
visit
in interfaceOsmPrimitiveVisitor
- Parameters:
r
- The relation to inspect.
-
-