/
siman_coder
/
JUnit
Обзор
Документация
Войти
/
siman_coder
/
JUnit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
java/org/example/Employee.java
50 строк
1 KB
siman_coder
Create: CsvJsonParser.java, Employee.java, Main.java, CsvJsonParserTest.java, build.gradle, data.csv, data.json, data.xml, data2.json
07 июл 2026, 11:23
Верифицирован
07 июл 2026, 11:23
1a342fc
Код
Авторство
О чём код?
package org.example; import java.util.Objects; public class Employee { public long id; public String firstName; public String lastName; public String country; public int age; public Employee() { } public Employee(long id, String firstName, String lastName, String country, int age) { this.id = id; this.firstName = firstName; this.lastName = lastName; this.country = country; this.age = age; } @Override public String toString() { return "Employee{" + "id=" + id + ", firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", country='" + country + '\'' + ", age=" + age + '}'; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Employee employee = (Employee) o; return id == employee.id && age == employee.age && Objects.equals(firstName, employee.firstName) && Objects.equals(lastName, employee.lastName) && Objects.equals(country, employee.country); } @Override public int hashCode() { return Objects.hash(id, firstName, lastName, country, age); } }