*/
package org.mxchange.jaddressbookcore.events.addressbook;
-import java.io.Serializable;
import org.mxchange.jaddressbookcore.model.addressbook.Addressbook;
/**
- * An interface for an event if an address book has been loaded
+ * An event fired when an address book has been loaded
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface AddressbookLoadedEvent extends Serializable {
+public class AddressbookLoadedEvent implements ObservableAddressbookLoadedEvent {
/**
- * Getter for address book instance
+ * Serial number
+ */
+ private static final long serialVersionUID = 48_305_823_537_427_713L;
+
+ /**
+ * Adress book instance causing this event
+ */
+ private final Addressbook addressbook;
+
+ /**
+ * Constructor with address book instance
* <p>
- * @return Address book instance
+ * @param addressbook Address book instance
*/
- Addressbook getAddressbook ();
+ public AddressbookLoadedEvent (final Addressbook addressbook) {
+ this.addressbook = addressbook;
+ }
+
+ @Override
+ public Addressbook getAddressbook () {
+ return this.addressbook;
+ }
}