]> git.mxchange.org Git - jphone-core.git/blobdiff - src/org/mxchange/jphone/model/phonenumbers/landline/LandLineNumber.java
Continued:
[jphone-core.git] / src / org / mxchange / jphone / model / phonenumbers / landline / LandLineNumber.java
index 4f39bcd9c43bf7b318f49dc2c6a53b4654d2a3bd..fdb6c0b846cd84ce09ffaf5451391747ecd5af3b 100644 (file)
@@ -151,12 +151,12 @@ public class LandLineNumber implements DialableLandLineNumber {
        }
 
        @Override
-       public int compareTo (final DialableLandLineNumber otherNumber) {
+       public int compareTo (final DialableLandLineNumber landLineNumber) {
                // Is the parameter given?
-               if (null == otherNumber) {
+               if (null == landLineNumber) {
                        // Throw NPE
-                       throw new NullPointerException("otherNumber is null"); //NOI18N
-               } else if (otherNumber.equals(this)) {
+                       throw new NullPointerException("Parameter 'landLineNumber' is null"); //NOI18N
+               } else if (Objects.equals(this, landLineNumber)) {
                        // Same object
                        return 0;
                }
@@ -164,11 +164,11 @@ public class LandLineNumber implements DialableLandLineNumber {
                // Init comparisons
                final int[] comparators = {
                        // First country
-                       this.getPhoneCountry().compareTo(otherNumber.getPhoneCountry()),
+                       this.getPhoneCountry().compareTo(landLineNumber.getPhoneCountry()),
                        // Next area code
-                       this.getPhoneAreaCode().compareTo(otherNumber.getPhoneAreaCode()),
+                       this.getPhoneAreaCode().compareTo(landLineNumber.getPhoneAreaCode()),
                        // Last number
-                       this.getPhoneNumber().compareTo(otherNumber.getPhoneNumber())
+                       this.getPhoneNumber().compareTo(landLineNumber.getPhoneNumber())
                };
 
                // Check all values