Possibility of registering new owners added
[RRRRHHHH_Code] / ruralHouses / src / domain / Account.java
index 53dff45..ba7a630 100644 (file)
@@ -1,9 +1,13 @@
 package domain;
 
+import java.util.Arrays;
+
 import businessLogic.SecurityManager;
 
 public class Account {
 
+       
+
        private byte[] username;
        private byte[] password;
        private byte[] salt;
@@ -65,5 +69,22 @@ public class Account {
        public void setSalt(byte[] salt) {
                this.salt = salt;
        }
+       
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               Account other = (Account) obj;
+               if (!Arrays.equals(password, other.password))
+                       return false;
+               if (!Arrays.equals(username, other.username))
+                       return false;
+               return true;
+       }
 
 }