package fr.jaquin.bdlg.planner.domain; import java.util.Objects; import java.util.Set; public class Volunteer { private Long id; private Set competencies; private Set preferences; public Volunteer(Long id, Set competencies, Set preferences) { this.id = id; this.competencies = competencies; this.preferences = preferences; } // ******************************** // Getters and setters // ******************************** public Long getId() { return this.id; } public Set getCompetencies() { return this.competencies; } public Set getPreferences() { return this.preferences; } @Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof Volunteer)) { return false; } Volunteer volonteer = (Volunteer) o; return id.equals(volonteer.id); } @Override public int hashCode() { return Objects.hash(id); } @Override public String toString() { return "Volunteer[id=" + this.id + "]"; } }