001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.osm.visitor; 003 004import org.openstreetmap.josm.data.osm.Changeset; 005import org.openstreetmap.josm.data.osm.Node; 006import org.openstreetmap.josm.data.osm.Relation; 007import org.openstreetmap.josm.data.osm.Way; 008 009/** 010 * Implementation of the visitor scheme. Every @{link org.openstreetmap.josm.data.OsmPrimitive} 011 * can be visited by several different visitors. 012 * @since 8 013 */ 014public interface Visitor { 015 /** 016 * Visiting call for points. 017 * @param n The node to inspect. 018 */ 019 void visit(Node n); 020 021 /** 022 * Visiting call for lines. 023 * @param w The way to inspect. 024 * @since 64 025 */ 026 void visit(Way w); 027 028 /** 029 * Visiting call for relations. 030 * @param r The relation to inspect. 031 * @since 343 032 */ 033 void visit(Relation r); 034 035 /** 036 * Visiting call for changesets. 037 * @param cs The changeset to inspect. 038 * @since 1523 039 */ 040 void visit(Changeset cs); 041}