--- /dev/null
+/*
+ * Copyright (C) 2016 - 2020 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
+ * 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.jphone.exceptions.mobile;
+
+import java.text.MessageFormat;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
+
+/**
+ * An exception thrown when a mobile number is not linked but should be.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class MobileNumberAlreadyLinkedException extends Exception {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 18_964_581_681_985_601L;
+
+ /**
+ * Constructor with mobile number
+ * <p>
+ * @param mobileNumber Mobile number
+ */
+ public MobileNumberAlreadyLinkedException (final DialableMobileNumber mobileNumber) {
+ // Call super constructor with message
+ super(MessageFormat.format("mobileNumber={0} with phoneId={1} cannot be linked, link target has already mobile number linked.", mobileNumber, mobileNumber.getMobileId())); //NOI18N
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2016 - 2020 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
+ * 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.jphone.exceptions.mobile;
+
+import java.text.MessageFormat;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
+
+/**
+ * An exception thrown when a mobile number is not linked but should be.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class MobileNumberNotLinkedException extends Exception {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 18_964_581_681_985_602L;
+
+ /**
+ * Constructor with mobile number
+ * <p>
+ * @param mobileNumber Mobile number
+ */
+ public MobileNumberNotLinkedException (final DialableMobileNumber mobileNumber) {
+ // Call super constructor with message
+ super(MessageFormat.format("mobileNumber={0} with phoneId={1} is not linked.", mobileNumber, mobileNumber.getMobileId())); //NOI18N
+ }
+
+}
import java.text.MessageFormat;
import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
/**
- * An exception thrown when a fax, land-line or mobile number is not linked but
- * should be.
+ * An exception thrown when a fax or land-linenumber is not linked but should
+ * be.
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
super(MessageFormat.format("landLineNumber={0} with phoneId={1} cannot be linked, link target has already land-line number linked.", landLineNumber, landLineNumber.getPhoneId())); //NOI18N
}
- /**
- * Constructor with mobile number
- * <p>
- * @param mobileNumber Mobile number
- */
- public PhoneNumberAlreadyLinkedException (final DialableMobileNumber mobileNumber) {
- // Call super constructor with message
- super(MessageFormat.format("mobileNumber={0} with phoneId={1} cannot be linked, link target has already mobile number linked.", mobileNumber, mobileNumber.getMobileId())); //NOI18N
- }
-
}
import java.text.MessageFormat;
import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
/**
- * An exception thrown when a fax, land-line or mobile number is not linked but
- * should be.
+ * An exception thrown when a fax or land-line number is not linked but should
+ * be.
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
super(MessageFormat.format("landLineNumber={0} with phoneId={1} is not linked.", landLineNumber, landLineNumber.getPhoneId())); //NOI18N
}
- /**
- * Constructor with mobile number
- * <p>
- * @param mobileNumber Mobile number
- */
- public PhoneNumberNotLinkedException (final DialableMobileNumber mobileNumber) {
- // Call super constructor with message
- super(MessageFormat.format("mobileNumber={0} with phoneId={1} is not linked.", mobileNumber, mobileNumber.getMobileId())); //NOI18N
- }
-
}