From: Roland Häder Date: Wed, 19 Apr 2017 22:48:00 +0000 (+0200) Subject: renamed interfaces/classes to better names X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9746a32e4c688402b0acb0fa5e213ab29ce96fdd;p=jaddressbook-share-core.git renamed interfaces/classes to better names Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jaddressbookcore/events/addressbook/AddressbookLoadedEvent.java b/src/org/mxchange/jaddressbookcore/events/addressbook/AddressbookLoadedEvent.java index 8319799..93438f7 100644 --- a/src/org/mxchange/jaddressbookcore/events/addressbook/AddressbookLoadedEvent.java +++ b/src/org/mxchange/jaddressbookcore/events/addressbook/AddressbookLoadedEvent.java @@ -16,20 +16,36 @@ */ 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 *

* @author Roland Häder */ -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 *

- * @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; + } } diff --git a/src/org/mxchange/jaddressbookcore/events/addressbook/LoadedAddressbookEvent.java b/src/org/mxchange/jaddressbookcore/events/addressbook/LoadedAddressbookEvent.java deleted file mode 100644 index 18a5e7e..0000000 --- a/src/org/mxchange/jaddressbookcore/events/addressbook/LoadedAddressbookEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 . - */ -package org.mxchange.jaddressbookcore.events.addressbook; - -import org.mxchange.jaddressbookcore.model.addressbook.Addressbook; - -/** - * An event fired when an address book has been loaded - *

- * @author Roland Häder - */ -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 - *

- * @param addressbook Address book instance - */ - public LoadedAddressbookEvent (final Addressbook addressbook) { - this.addressbook = addressbook; - } - - @Override - public Addressbook getAddressbook () { - return this.addressbook; - } -} diff --git a/src/org/mxchange/jaddressbookcore/events/addressbook/ObservableAddressbookLoadedEvent.java b/src/org/mxchange/jaddressbookcore/events/addressbook/ObservableAddressbookLoadedEvent.java new file mode 100644 index 0000000..292d28b --- /dev/null +++ b/src/org/mxchange/jaddressbookcore/events/addressbook/ObservableAddressbookLoadedEvent.java @@ -0,0 +1,35 @@ +/* + * 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 . + */ +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 + *

+ * @author Roland Häder + */ +public interface ObservableAddressbookLoadedEvent extends Serializable { + + /** + * Getter for address book instance + *

+ * @return Address book instance + */ + Addressbook getAddressbook (); +} diff --git a/src/org/mxchange/jaddressbookcore/events/sharing/AddressbookSharingEvent.java b/src/org/mxchange/jaddressbookcore/events/sharing/AddressbookSharingEvent.java deleted file mode 100644 index a682909..0000000 --- a/src/org/mxchange/jaddressbookcore/events/sharing/AddressbookSharingEvent.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 . - */ -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 - *

- * @author Roland Häder - */ -public interface AddressbookSharingEvent extends Serializable { - - /** - * Getter for address book share instance - *

- * @return Address book share instance - */ - ShareableAddressbook getShareableAddressbook (); - - /** - * Getter for sharing type enum - *

- * @return Sharing type enum - */ - SharingType getSharingType (); -} diff --git a/src/org/mxchange/jaddressbookcore/events/sharing/EndedAddressbookSharingEvent.java b/src/org/mxchange/jaddressbookcore/events/sharing/EndedAddressbookSharingEvent.java index b08ebd3..34876f9 100644 --- a/src/org/mxchange/jaddressbookcore/events/sharing/EndedAddressbookSharingEvent.java +++ b/src/org/mxchange/jaddressbookcore/events/sharing/EndedAddressbookSharingEvent.java @@ -24,7 +24,7 @@ import org.mxchange.jaddressbookcore.model.addressbook.shared.ShareableAddressbo *

* @author Roland Häder */ -public class EndedAddressbookSharingEvent implements AddressbookSharingEvent { +public class EndedAddressbookSharingEvent implements ObservableAddressbookSharingEvent { /** * Serial number diff --git a/src/org/mxchange/jaddressbookcore/events/sharing/ObservableAddressbookSharingEvent.java b/src/org/mxchange/jaddressbookcore/events/sharing/ObservableAddressbookSharingEvent.java new file mode 100644 index 0000000..70eb008 --- /dev/null +++ b/src/org/mxchange/jaddressbookcore/events/sharing/ObservableAddressbookSharingEvent.java @@ -0,0 +1,43 @@ +/* + * 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 . + */ +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 + *

+ * @author Roland Häder + */ +public interface ObservableAddressbookSharingEvent extends Serializable { + + /** + * Getter for address book share instance + *

+ * @return Address book share instance + */ + ShareableAddressbook getShareableAddressbook (); + + /** + * Getter for sharing type enum + *

+ * @return Sharing type enum + */ + SharingType getSharingType (); +} diff --git a/src/org/mxchange/jaddressbookcore/events/sharing/StartedAddressbookSharingEvent.java b/src/org/mxchange/jaddressbookcore/events/sharing/StartedAddressbookSharingEvent.java index aa27ff6..709065f 100644 --- a/src/org/mxchange/jaddressbookcore/events/sharing/StartedAddressbookSharingEvent.java +++ b/src/org/mxchange/jaddressbookcore/events/sharing/StartedAddressbookSharingEvent.java @@ -24,7 +24,7 @@ import org.mxchange.jaddressbookcore.model.addressbook.shared.ShareableAddressbo *

* @author Roland Häder */ -public class StartedAddressbookSharingEvent implements AddressbookSharingEvent { +public class StartedAddressbookSharingEvent implements ObservableAddressbookSharingEvent { /** * Serial number