From 52abfcfac79c4eb8fc9a5d7abba91a9a0116cb37 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Thu, 24 Oct 2019 17:17:12 +0200 Subject: [PATCH] Field is an actual class, fluent setters --- .../src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java index 59287ddc4..a833f1ba8 100644 --- a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java +++ b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Field.java @@ -2,7 +2,7 @@ package eu.dnetlib.dhp.schema.oaf; import java.io.Serializable; -public abstract class Field implements Serializable { +public class Field implements Serializable { private T value; @@ -12,15 +12,17 @@ public abstract class Field implements Serializable { return value; } - public void setValue(T value) { + public Field setValue(T value) { this.value = value; + return this; } public DataInfo getDataInfo() { return dataInfo; } - public void setDataInfo(DataInfo dataInfo) { + public Field setDataInfo(DataInfo dataInfo) { this.dataInfo = dataInfo; + return this; } }