org.openstreetmap.josm.data.validation.util
Class AggregatePrimitivesVisitor

java.lang.Object
  extended by org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
      extended by org.openstreetmap.josm.data.validation.util.AggregatePrimitivesVisitor
All Implemented Interfaces:
Visitor

public class AggregatePrimitivesVisitor
extends AbstractVisitor

A visitor that aggregates all primitives it visits.

The primitives are sorted according to their type: first nodes, then ways.


Field Summary
(package private)  java.util.Collection<OsmPrimitive> aggregatedData
          Aggregated data
 
Constructor Summary
AggregatePrimitivesVisitor()
           
 
Method Summary
 java.util.Collection<OsmPrimitive> visit(java.util.Collection<OsmPrimitive> data)
          Visits a collection of primitives
 void visit(Node n)
          Visiting call for points.
 void visit(Relation r)
          Visiting call for relations.
 void visit(Way w)
          Visiting call for lines.
 
Methods inherited from class org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aggregatedData

final java.util.Collection<OsmPrimitive> aggregatedData
Aggregated data

Constructor Detail

AggregatePrimitivesVisitor

public AggregatePrimitivesVisitor()
Method Detail

visit

public java.util.Collection<OsmPrimitive> visit(java.util.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: Visitor
Visiting call for points.

Parameters:
n - The node to inspect.

visit

public void visit(Way w)
Description copied from interface: Visitor
Visiting call for lines.

Parameters:
w - The way to inspect.

visit

public void visit(Relation r)
Description copied from interface: Visitor
Visiting call for relations.

Parameters:
r - The relation to inspect.


JOSM