Added the copying of "extension" fiels
This commit is contained in:
parent
c422ddc388
commit
c8fa589baa
|
@ -34,6 +34,7 @@ package org.hl7.fhir.r4.model;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.ObjectInput;
|
import java.io.ObjectInput;
|
||||||
import java.io.ObjectOutput;
|
import java.io.ObjectOutput;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.hl7.fhir.instance.model.api.IBaseEnumeration;
|
import org.hl7.fhir.instance.model.api.IBaseEnumeration;
|
||||||
|
|
||||||
|
@ -117,10 +118,17 @@ public class Enumeration<T extends Enum<?>> extends PrimitiveType<T> implements
|
||||||
setValue(theValue);
|
setValue(theValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Enumeration<T> copy() {
|
public Enumeration<T> copy() {
|
||||||
return new Enumeration<T>(myEnumFactory, getValue());
|
Enumeration dst= new Enumeration(this.myEnumFactory, (Enum)this.getValue());
|
||||||
}
|
//Copy the Extension
|
||||||
|
if (extension != null) {
|
||||||
|
dst.extension = new ArrayList();
|
||||||
|
for (Extension i : extension)
|
||||||
|
dst.extension.add(i.copy());
|
||||||
|
};
|
||||||
|
return dst;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String encode(T theValue) {
|
protected String encode(T theValue) {
|
||||||
|
|
|
@ -34,6 +34,7 @@ package org.hl7.fhir.r5.model;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.ObjectInput;
|
import java.io.ObjectInput;
|
||||||
import java.io.ObjectOutput;
|
import java.io.ObjectOutput;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.hl7.fhir.instance.model.api.IBaseEnumeration;
|
import org.hl7.fhir.instance.model.api.IBaseEnumeration;
|
||||||
|
|
||||||
|
@ -117,10 +118,17 @@ public class Enumeration<T extends Enum<?>> extends PrimitiveType<T> implements
|
||||||
setValue(theValue);
|
setValue(theValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Enumeration<T> copy() {
|
public Enumeration<T> copy() {
|
||||||
return new Enumeration<T>(myEnumFactory, getValue());
|
Enumeration dst= new Enumeration(this.myEnumFactory, (Enum)this.getValue());
|
||||||
}
|
//Copy the Extension
|
||||||
|
if (extension != null) {
|
||||||
|
dst.extension = new ArrayList();
|
||||||
|
for (Extension i : extension)
|
||||||
|
dst.extension.add(i.copy());
|
||||||
|
};
|
||||||
|
return dst;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String encode(T theValue) {
|
protected String encode(T theValue) {
|
||||||
|
|
Loading…
Reference in New Issue