/*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016 - 2024 Free Software Foundation
*
* 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
*/
package org.mxchange.jcontacts.events.fax.linked;
-import java.io.Serializable;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
/**
- * An interface for an event when a fax number has been linked with a contact
+ * An event when a fax number has been linked with a contact
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-public interface AdminLinkedFaxNumberEvent extends Serializable {
+public class AdminLinkedFaxNumberEvent implements ObservableAdminLinkedFaxNumberEvent {
/**
- * Getter for linked fax numbers
- * <p>
- * @return Linked fax numbers
+ * Serial number
*/
- DialableFaxNumber getLinkedFaxNumber ();
+ private static final long serialVersionUID = 18_521_758_718_691_064L;
/**
- * Getter for contact instance
+ * Contact instance
+ */
+ private final Contact contact;
+
+ /**
+ * Linked fax number
+ */
+ private final DialableFaxNumber linkedFaxNumber;
+
+ /**
+ * Constructor with unlinked fax number
* <p>
- * @return Contact instance
+ * @param contact Contact with linked fax instance
+ * @param linkedFaxNumber Unlinked fax number
*/
- Contact getContact ();
+ public AdminLinkedFaxNumberEvent (final Contact contact, final DialableFaxNumber linkedFaxNumber) {
+ // Set it here
+ this.contact = contact;
+ this.linkedFaxNumber = linkedFaxNumber;
+ }
+
+ @Override
+ public Contact getContact () {
+ return this.contact;
+ }
+
+ @Override
+ public DialableFaxNumber getLinkedFaxNumber () {
+ return this.linkedFaxNumber;
+ }
}