if (!Objects.equals(this.getProviderDialPrefix(), mobileProvider.getProviderDialPrefix())) {
return false;
+ } else if (!Objects.equals(this.getProviderId(), mobileProvider.getProviderId())) {
+ return false;
+ } else if (!Objects.equals(this.getProviderMailPattern(), mobileProvider.getProviderMailPattern())) {
+ return false;
} else if (!Objects.equals(this.getProviderName(), mobileProvider.getProviderName())) {
return false;
} else if (!Objects.equals(this.getProviderCountry(), mobileProvider.getProviderCountry())) {
int hash = 7;
hash = 19 * hash + Objects.hashCode(this.getProviderDialPrefix());
+ hash = 19 * hash + Objects.hashCode(this.getProviderId());
+ hash = 19 * hash + Objects.hashCode(this.getProviderMailPattern());
hash = 19 * hash + Objects.hashCode(this.getProviderName());
hash = 19 * hash + Objects.hashCode(this.getProviderCountry());
*/
private static final long serialVersionUID = 1_948_653_672_761L;
+ /**
+ * Compares two fax number instances with each other
+ * <p>
+ * @param faxNumber1 First instance of a DialableFaxNumber class
+ * @param faxNumber2 Second instance of a DialableFaxNumber class
+ * <p>
+ * @return Comparison value
+ */
+ public static int compare (final DialableFaxNumber faxNumber1, final DialableFaxNumber faxNumber2) {
+ // Check equality, then at least first must be given
+ if (Objects.equals(faxNumber1, faxNumber2)) {
+ // Both are same
+ return 0;
+ } else if (null == faxNumber1) {
+ // First is null
+ return -1;
+ } else if (null == faxNumber2) {
+ // Second is null
+ return 1;
+ }
+
+ // Invoke compareTo() method
+ return faxNumber1.compareTo(faxNumber2);
+ }
+
/**
* Copy all fields from source object to this
* <p>
*/
private static final long serialVersionUID = 18_698_467_372_167_561L;
+ /**
+ * Compares two mobile number instances with each other
+ * <p>
+ * @param landLineNumber1 First instance of a DialableLandLineNumber class
+ * @param landLineNumber2 Second instance of a DialableLandLineNumber class
+ * <p>
+ * @return Comparison value
+ */
+ public static int compare (final DialableLandLineNumber landLineNumber1, final DialableLandLineNumber landLineNumber2) {
+ // Check equality, then at least first must be given
+ if (Objects.equals(landLineNumber1, landLineNumber2)) {
+ // Both are same
+ return 0;
+ } else if (null == landLineNumber1) {
+ // First is null
+ return -1;
+ } else if (null == landLineNumber2) {
+ // Second is null
+ return 1;
+ }
+
+ // Invoke compareTo() method
+ return landLineNumber1.compareTo(landLineNumber2);
+ }
+
/**
* Copy all fields from source object to this
* <p>
*/
private static final long serialVersionUID = 291_608_496_882_761L;
+ /**
+ * Compares two mobile number instances with each other
+ * <p>
+ * @param mobileNumber1 First instance of a DialableMobileNumber class
+ * @param mobileNumber2 Second instance of a DialableMobileNumber class
+ * <p>
+ * @return Comparison value
+ */
+ public static int compare (final DialableMobileNumber mobileNumber1, final DialableMobileNumber mobileNumber2) {
+ // Check equality, then at least first must be given
+ if (Objects.equals(mobileNumber1, mobileNumber2)) {
+ // Both are same
+ return 0;
+ } else if (null == mobileNumber1) {
+ // First is null
+ return -1;
+ } else if (null == mobileNumber2) {
+ // Second is null
+ return 1;
+ }
+
+ // Invoke compareTo() method
+ return mobileNumber1.compareTo(mobileNumber2);
+ }
+
/**
* Copy all fields from source object to this
* <p>
*/
private static final long serialVersionUID = 15_468_608_721_651L;
- public static int compare (MobileProvider mobileProvider, MobileProvider mobileProvider0) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ /**
+ * Compares two mobile provider instances with each other
+ * <p>
+ * @param mobileProvider1 First instance of a MobileProvider class
+ * @param mobileProvider2 Second instance of a MobileProvider class
+ * <p>
+ * @return Comparison value
+ */
+ public static int compare (final MobileProvider mobileProvider1, final MobileProvider mobileProvider2) {
+ // Check equality, then at least first must be given
+ if (Objects.equals(mobileProvider1, mobileProvider2)) {
+ // Both are same
+ return 0;
+ } else if (null == mobileProvider1) {
+ // First is null
+ return -1;
+ } else if (null == mobileProvider2) {
+ // Second is null
+ return 1;
+ }
+
+ // Invoke compareTo() method
+ return mobileProvider1.compareTo(mobileProvider2);
}
/**