001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.data.osm;
003
004/**
005 * This is a visitor that can be used to loop over the keys/values of this primitive.
006 *
007 * @author Michael Zangl
008 * @since 8742
009 * @since 10600 (functional interface)
010 * @since 13561 (extracted from {@link AbstractPrimitive}, supports {@link Tagged} objects)
011 */
012@FunctionalInterface
013public interface KeyValueVisitor {
014
015    /**
016     * This method gets called for every tag received.
017     *
018     * @param primitive This primitive
019     * @param key   The key
020     * @param value The value
021     */
022    void visitKeyValue(Tagged primitive, String key, String value);
023}