-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser.java
47 lines (39 loc) · 1.14 KB
/
User.java
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
import java.util.Objects;
public class User {
private String nom;
private String prenom;
private String specialite;
private String club;
public User(String nom, String prenom, String specialite, String club) {
this.nom = nom;
this.prenom = prenom;
this.specialite = specialite;
this.club = club;
}
public String getNom() {
return nom;
}
public String getPrenom() {
return prenom;
}
public String getSpecialite() {
return specialite;
}
public String getClub() {
return club;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
User user = (User) o;
return Objects.equals(nom, user.nom) &&
Objects.equals(prenom, user.prenom) &&
Objects.equals(specialite, user.specialite) &&
Objects.equals(club, user.club);
}
@Override
public int hashCode() {
return Objects.hash(nom, prenom, specialite, club);
}
}