001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.plugins.eventbus.io;
003
004import java.util.EventObject;
005
006import org.openstreetmap.josm.io.OsmApi;
007
008/**
009 * Event fired when the OSM API is initialized.
010 */
011public class OsmApiInitializedEvent extends EventObject {
012
013    private static final long serialVersionUID = 1L;
014
015    private final OsmApi osmApi;
016
017    /**
018     * Constructs a new {@code OsmApiInitializedEvent}.
019     * @param source object on which the Event initially occurred
020     * @param osmApi OSM API
021     */
022    public OsmApiInitializedEvent(Object source, OsmApi osmApi) {
023        super(source);
024        this.osmApi = osmApi;
025    }
026
027    /**
028     * Returns the OSM API.
029     * @return the OSM API
030     */
031    public final OsmApi getOsmApi() {
032        return osmApi;
033    }
034}