RRRRHHHH_Code
Diff Revisions
0f75b2 ...
vs
7bf57b ...
for ruralHouses/src/domain/Account.java
|
@@ -1,9 +1,13 @@ |
1 |
1 |
|
package domain; |
2 |
2 |
|
|
|
3 |
+ |
import java.util.Arrays; |
|
4 |
+ |
|
3 |
5 |
|
import businessLogic.SecurityManager; |
4 |
6 |
|
|
5 |
7 |
|
public class Account { |
6 |
8 |
|
|
|
9 |
+ |
|
|
10 |
+ |
|
7 |
11 |
|
private byte[] username; |
8 |
12 |
|
private byte[] password; |
9 |
13 |
|
private byte[] salt; |
|
@@ -65,5 +69,22 @@ |
65 |
69 |
|
public void setSalt(byte[] salt) { |
66 |
70 |
|
this.salt = salt; |
67 |
71 |
|
} |
|
72 |
+ |
|
|
73 |
+ |
|
|
74 |
+ |
@Override |
|
75 |
+ |
public boolean equals(Object obj) { |
|
76 |
+ |
if (this == obj) |
|
77 |
+ |
return true; |
|
78 |
+ |
if (obj == null) |
|
79 |
+ |
return false; |
|
80 |
+ |
if (getClass() != obj.getClass()) |
|
81 |
+ |
return false; |
|
82 |
+ |
Account other = (Account) obj; |
|
83 |
+ |
if (!Arrays.equals(password, other.password)) |
|
84 |
+ |
return false; |
|
85 |
+ |
if (!Arrays.equals(username, other.username)) |
|
86 |
+ |
return false; |
|
87 |
+ |
return true; |
|
88 |
+ |
} |
68 |
89 |
|
|
69 |
90 |
|
} |