From f741c8c4c5c3247a6757393e536d7be5771f3cec Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 10 Oct 2015 22:51:23 +0200 Subject: [PATCH] added country instance to all number types and cell phone provider --- .../jphone/phonenumbers/DialableNumber.java | 15 ++++++++++++ .../cellphone/CellphoneNumber.java | 19 +++++++++++++++ .../jphone/phonenumbers/fax/FaxNumber.java | 24 ++++++++++++++++++- .../phonenumbers/landline/LandLineNumber.java | 16 ++++++++++--- .../smsprovider/CellphoneProvider.java | 22 +++++++++++++++++ .../phonenumbers/smsprovider/SmsProvider.java | 15 ++++++++++++ 6 files changed, 107 insertions(+), 4 deletions(-) diff --git a/src/org/mxchange/jphone/phonenumbers/DialableNumber.java b/src/org/mxchange/jphone/phonenumbers/DialableNumber.java index e7393cd..2c157f6 100644 --- a/src/org/mxchange/jphone/phonenumbers/DialableNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/DialableNumber.java @@ -17,6 +17,7 @@ package org.mxchange.jphone.phonenumbers; import java.io.Serializable; +import org.mxchange.jcountry.data.Country; /** * A POJO for dialable numbers @@ -25,6 +26,20 @@ import java.io.Serializable; */ public interface DialableNumber extends Serializable { + /** + * Getter for country instance ('s dial data) + *

+ * @return Country instance + */ + public Country getCountry (); + + /** + * Setter for country instance ('s dial data) + *

+ * @param country Country instance + */ + public void setCountry (final Country country); + /** * Getter for id number *

diff --git a/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java b/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java index 691b4b3..d06a3bb 100644 --- a/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java @@ -26,6 +26,8 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.Table; +import org.mxchange.jcountry.data.Country; +import org.mxchange.jcountry.data.CountryData; import org.mxchange.jphone.phonenumbers.smsprovider.CellphoneProvider; import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider; @@ -65,6 +67,13 @@ public class CellphoneNumber implements DialableCellphoneNumber, Comparable + * @return Country instance + */ + public Country getCountry (); + + /** + * Setter for country instance ('s dial data) + *

+ * @param country Country instance + */ + public void setCountry (final Country country); } -- 2.39.5