class Employee { private final String name; private final String city; private final double salary; public Employee(String name, String city, double salary) { this.name = name; this.city = city; this.salary = salary; } @Override public int hasCode() { return Objects.hash(name, city, salary); } @Override public boolean equals(Object obj) { if (this == obj) { return true; }else if (!(obj instanceof Employee) { return false; }else { Employee emp = (Employee) obj; return Objects.equals(name, emp.name) && Objects.equals(city, emp.city) && Objects.equals(salary, emp.salary } } @Override public String toString() { return "Employee [name=" + name + ", city=" + city + ", salary=" + salary + "]"; } // Ide jönnek a szabványos elérők }