001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.data.validation;
003
004import java.util.List;
005
006import org.openstreetmap.josm.data.osm.Node;
007import org.openstreetmap.josm.data.osm.OsmPrimitive;
008import org.openstreetmap.josm.data.osm.WaySegment;
009
010/**
011 * A visitor that is used during validation.
012 * <p>
013 * The most basic use is to visit all {@link TestError}s of the validator
014 */
015public interface ValidatorVisitor {
016    /**
017     * Visit a test error
018     * @param error The test error to visit
019     */
020    void visit(TestError error);
021
022    /**
023     * Visit a OSM primitive, e.g. to highlight it
024     * @param primitive The primitive
025     */
026    void visit(OsmPrimitive primitive);
027
028    /**
029     * Visit a way segment that was part of the error
030     * @param waySegment The way segment
031     */
032    void visit(WaySegment waySegment);
033
034    /**
035     * Visit a list of nodes that are part of the error
036     * @param nodes The nodes
037     */
038    void visit(List<Node> nodes);
039}