*/
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;
+ }
}
+++ /dev/null
-/*
- * Copyright (C) 2016 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jaddressbookcore.events.addressbook;
-
-import org.mxchange.jaddressbookcore.model.addressbook.Addressbook;
-
-/**
- * An event fired when an address book has been loaded
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class LoadedAddressbookEvent implements AddressbookLoadedEvent {
-
- /**
- * 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>
- * @param addressbook Address book instance
- */
- public LoadedAddressbookEvent (final Addressbook addressbook) {
- this.addressbook = addressbook;
- }
-
- @Override
- public Addressbook getAddressbook () {
- return this.addressbook;
- }
-}
--- /dev/null
+/*
+ * Copyright (C) 2016 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+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
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAddressbookLoadedEvent extends Serializable {
+
+ /**
+ * Getter for address book instance
+ * <p>
+ * @return Address book instance
+ */
+ Addressbook getAddressbook ();
+}
+++ /dev/null
-/*
- * Copyright (C) 2016 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jaddressbookcore.events.sharing;
-
-import java.io.Serializable;
-import org.mxchange.jaddressbookcore.events.sharing.type.SharingType;
-import org.mxchange.jaddressbookcore.model.addressbook.shared.ShareableAddressbook;
-
-/**
- * An interface for address book sharing events
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface AddressbookSharingEvent extends Serializable {
-
- /**
- * Getter for address book share instance
- * <p>
- * @return Address book share instance
- */
- ShareableAddressbook getShareableAddressbook ();
-
- /**
- * Getter for sharing type enum
- * <p>
- * @return Sharing type enum
- */
- SharingType getSharingType ();
-}
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public class EndedAddressbookSharingEvent implements AddressbookSharingEvent {
+public class EndedAddressbookSharingEvent implements ObservableAddressbookSharingEvent {
/**
* Serial number
--- /dev/null
+/*
+ * Copyright (C) 2016 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jaddressbookcore.events.sharing;
+
+import java.io.Serializable;
+import org.mxchange.jaddressbookcore.events.sharing.type.SharingType;
+import org.mxchange.jaddressbookcore.model.addressbook.shared.ShareableAddressbook;
+
+/**
+ * An interface for address book sharing events
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAddressbookSharingEvent extends Serializable {
+
+ /**
+ * Getter for address book share instance
+ * <p>
+ * @return Address book share instance
+ */
+ ShareableAddressbook getShareableAddressbook ();
+
+ /**
+ * Getter for sharing type enum
+ * <p>
+ * @return Sharing type enum
+ */
+ SharingType getSharingType ();
+}
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public class StartedAddressbookSharingEvent implements AddressbookSharingEvent {
+public class StartedAddressbookSharingEvent implements ObservableAddressbookSharingEvent {
/**
* Serial number