001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.osm.history; 003 004import org.openstreetmap.josm.data.osm.PrimitiveId; 005 006/** 007 * A listener that listens to changes in the {@link HistoryDataSet}. 008 * @see HistoryDataSet#addHistoryDataSetListener(HistoryDataSetListener) 009 */ 010public interface HistoryDataSetListener { 011 /** 012 * Fired by a {@link HistoryDataSet} if the cached history of an OSM primitive with 013 * id <code>id</code> is updated 014 * 015 * @param source the data set firing the event 016 * @param id the id of the updated primitive 017 */ 018 void historyUpdated(HistoryDataSet source, PrimitiveId id); 019 020 /** 021 * Fired by a {@link HistoryDataSet} if the history cached is cleared. 022 * 023 * @param source the history data set firing the event 024 */ 025 void historyDataSetCleared(HistoryDataSet source); 026}