added equals for programme

This commit is contained in:
Miriam Baglioni 2020-05-27 17:23:34 +02:00
parent 92e3a52e91
commit f3dcca0dd0
1 changed files with 17 additions and 1 deletions

View File

@ -1,7 +1,10 @@
package eu.dnetlib.dhp.schema.oaf; package eu.dnetlib.dhp.schema.oaf;
public class Programme { import java.io.Serializable;
import java.util.Objects;
public class Programme implements Serializable {
private String code; private String code;
private String description; private String description;
@ -20,4 +23,17 @@ public class Programme {
public void setDescription(String description) { public void setDescription(String description) {
this.description = description; this.description = description;
} }
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Programme programme = (Programme) o;
return Objects.equals(code, programme.code);
}
} }