1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
package com.mavlushechka.a1qa.models;
import java.util.Objects;
public class User {
public final String id;
public final String name;
public final String username;
public final String email;
public final Address address;
public final String phone;
public final String website;
public final Company company;
public User(String id, String name, String username, String email, Address address, String phone, String website, Company company) {
this.id = id;
this.name = name;
this.username = username;
this.email = email;
this.address = address;
this.phone = phone;
this.website = website;
this.company = company;
}
@Override
public boolean equals(Object object) {
if (this == object) return true;
if (object == null || getClass() != object.getClass()) return false;
User user = (User) object;
return Objects.equals(id, user.id) && Objects.equals(name, user.name) && Objects.equals(username, user.username) && Objects.equals(email, user.email) && Objects.equals(address, user.address) && Objects.equals(phone, user.phone) && Objects.equals(website, user.website) && Objects.equals(company, user.company);
}
@Override
public String toString() {
return "User{" +
"id='" + id + '\'' +
", name='" + name + '\'' +
", username='" + username + '\'' +
", email='" + email + '\'' +
", address=" + address +
", phone='" + phone + '\'' +
", website='" + website + '\'' +
", company=" + company +
'}';
}
}
|