|
20 | 20 | */ |
21 | 21 | public class Author { |
22 | 22 |
|
| 23 | + private String name; |
| 24 | + private String lastName; |
| 25 | + private LocalDate birthdate; |
| 26 | + private String country; |
| 27 | + |
| 28 | + public Author() { |
| 29 | + } |
| 30 | + |
| 31 | + public Author(String name, String lastName, LocalDate birthdate, String country) { |
| 32 | + this.name = name; |
| 33 | + this.lastName = lastName; |
| 34 | + this.birthdate = birthdate; |
| 35 | + this.country = country; |
| 36 | + } |
| 37 | + |
| 38 | + public String getName() { |
| 39 | + return name; |
| 40 | + } |
| 41 | + |
| 42 | + public void setName(String name) { |
| 43 | + this.name = name; |
| 44 | + } |
| 45 | + |
| 46 | + public String getLastName() { |
| 47 | + return lastName; |
| 48 | + } |
| 49 | + |
| 50 | + public void setLastName(String lastName) { |
| 51 | + this.lastName = lastName; |
| 52 | + } |
| 53 | + |
| 54 | + public LocalDate getBirthdate() { |
| 55 | + return birthdate; |
| 56 | + } |
| 57 | + |
| 58 | + public void setBirthdate(LocalDate birthdate) { |
| 59 | + this.birthdate = birthdate; |
| 60 | + } |
| 61 | + |
| 62 | + public String getCountry() { |
| 63 | + return country; |
| 64 | + } |
| 65 | + |
| 66 | + public void setCountry(String country) { |
| 67 | + this.country = country; |
| 68 | + } |
| 69 | + |
| 70 | + @Override |
| 71 | + public int hashCode() { |
| 72 | + return super.hashCode(); |
| 73 | + } |
| 74 | + |
| 75 | + @Override |
| 76 | + public boolean equals(Object obj) { |
| 77 | + return super.equals(obj); |
| 78 | + } |
| 79 | + |
| 80 | + @Override |
| 81 | + public String toString() { |
| 82 | + return "Author{" + |
| 83 | + "name='" + name + '\'' + |
| 84 | + ", lastName='" + lastName + '\'' + |
| 85 | + ", birthdate=" + birthdate + |
| 86 | + ", country='" + country + '\'' + |
| 87 | + '}'; |
| 88 | + } |
| 89 | + |
23 | 90 | } |
0 commit comments