| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- package fr.jaquin.bdlg.planner.domain;
- import java.util.Objects;
- import java.util.Set;
- public class Volunteer {
- private Long id;
- private Set<Skill> competencies;
- private Set<Skill> preferences;
- public Volunteer(Long id, Set<Skill> competencies, Set<Skill> preferences) {
- this.id = id;
- this.competencies = competencies;
- this.preferences = preferences;
- }
- // ********************************
- // Getters and setters
- // ********************************
- public Long getId() {
- return this.id;
- }
- public Set<Skill> getCompetencies() {
- return this.competencies;
- }
- public Set<Skill> 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 + "]";
- }
- }
|