001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.data.osm.visitor;
003
004import org.openstreetmap.josm.data.osm.INode;
005import org.openstreetmap.josm.data.osm.IRelation;
006import org.openstreetmap.josm.data.osm.IWay;
007
008/**
009 * OSM primitives interfaces visitor, following conventional <a href="https://en.wikipedia.org/wiki/Visitor_pattern">visitor design pattern</a>.
010 * @since 4100
011 */
012public interface PrimitiveVisitor {
013
014    /**
015     * Visiting call for nodes.
016     * @param n The node to inspect.
017     */
018    void visit(INode n);
019
020    /**
021     * Visiting call for ways.
022     * @param w The way to inspect.
023     */
024    void visit(IWay w);
025
026    /**
027     * Visiting call for relations.
028     * @param r The relation to inspect.
029     */
030    void visit(IRelation r);
031}