@Override public Base addChild(String name) throws FHIRException { if (name.equals("degree")) { this.degree = new CodeableConcept(); return this.degree; } else if (name.equals("amount")) { this.amount = new SubstanceAmount(); return this.amount; } else return super.addChild(name); }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case -1413853096: // amount this.amount = castToType(value); // Type return value; case -1424857166: // amountType this.amountType = castToCodeableConcept(value); // CodeableConcept return value; case -1424876123: // amountText this.amountText = castToString(value); // StringType return value; case -1912545102: // referenceRange this.referenceRange = (SubstanceAmountReferenceRangeComponent) value; // SubstanceAmountReferenceRangeComponent return value; default: return super.setProperty(hash, name, value); } }
@Override public boolean equalsDeep(Base other_) { if (!super.equalsDeep(other_)) return false; if (!(other_ instanceof SubstanceAmount)) return false; SubstanceAmount o = (SubstanceAmount) other_; return compareDeep(amount, o.amount, true) && compareDeep(amountType, o.amountType, true) && compareDeep(amountText, o.amountText, true) && compareDeep(referenceRange, o.referenceRange, true); }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 646780200: return getAmount(); case -1413853096: return getAmount(); case -1424857166: return getAmountType(); case -1424876123: return getAmountTextElement(); case -1912545102: return getReferenceRange(); default: return super.makeProperty(hash, name); } }
public SubstanceAmount copy() { SubstanceAmount dst = new SubstanceAmount(); copyValues(dst); dst.amount = amount == null ? null : amount.copy(); dst.amountType = amountType == null ? null : amountType.copy(); dst.amountText = amountText == null ? null : amountText.copy(); dst.referenceRange = referenceRange == null ? null : referenceRange.copy(); return dst; }
protected SubstanceAmount typedCopy() { return copy(); }
@Override public boolean equalsShallow(Base other_) { if (!super.equalsShallow(other_)) return false; if (!(other_ instanceof SubstanceAmount)) return false; SubstanceAmount o = (SubstanceAmount) other_; return compareValues(amountText, o.amountText, true); }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 646780200: return getAmount(); case -1413853096: return getAmount(); case -1424857166: return getAmountType(); case -1424876123: return getAmountTextElement(); case -1912545102: return getReferenceRange(); default: return super.makeProperty(hash, name); } }
public SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent copy() { SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent dst = new SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent(); copyValues(dst); dst.degree = degree == null ? null : degree.copy(); dst.amount = amount == null ? null : amount.copy(); return dst; }
public SubstanceAmount copy() { SubstanceAmount dst = new SubstanceAmount(); copyValues(dst); dst.amount = amount == null ? null : amount.copy(); dst.amountType = amountType == null ? null : amountType.copy(); dst.amountText = amountText == null ? null : amountText.copy(); dst.referenceRange = referenceRange == null ? null : referenceRange.copy(); return dst; }
@Override public boolean equalsShallow(Base other_) { if (!super.equalsShallow(other_)) return false; if (!(other_ instanceof SubstanceAmount)) return false; SubstanceAmount o = (SubstanceAmount) other_; return compareValues(amountText, o.amountText, true); }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("amount[x]")) { this.amount = castToType(value); // Type } else if (name.equals("amountType")) { this.amountType = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("amountText")) { this.amountText = castToString(value); // StringType } else if (name.equals("referenceRange")) { this.referenceRange = (SubstanceAmountReferenceRangeComponent) value; // SubstanceAmountReferenceRangeComponent } else return super.setProperty(name, value); return value; }
/** * @return {@link #amount} (Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.) */ public SubstanceAmount getAmount() { if (this.amount == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SubstanceMoiety.amount"); else if (Configuration.doAutoCreate()) this.amount = new SubstanceAmount(); // cc return this.amount; }
public SubstancePolymerRepeatRepeatUnitComponent copy() { SubstancePolymerRepeatRepeatUnitComponent dst = new SubstancePolymerRepeatRepeatUnitComponent(); copyValues(dst); dst.orientationOfPolymerisation = orientationOfPolymerisation == null ? null : orientationOfPolymerisation.copy(); dst.repeatUnit = repeatUnit == null ? null : repeatUnit.copy(); dst.amount = amount == null ? null : amount.copy(); if (degreeOfPolymerisation != null) { dst.degreeOfPolymerisation = new ArrayList<SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent>(); for (SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisationComponent i : degreeOfPolymerisation) dst.degreeOfPolymerisation.add(i.copy()); }; if (structuralRepresentation != null) { dst.structuralRepresentation = new ArrayList<SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent>(); for (SubstancePolymerRepeatRepeatUnitStructuralRepresentationComponent i : structuralRepresentation) dst.structuralRepresentation.add(i.copy()); }; return dst; }
@Override public boolean equalsDeep(Base other_) { if (!super.equalsDeep(other_)) return false; if (!(other_ instanceof SubstanceAmount)) return false; SubstanceAmount o = (SubstanceAmount) other_; return compareDeep(amount, o.amount, true) && compareDeep(amountType, o.amountType, true) && compareDeep(amountText, o.amountText, true) && compareDeep(referenceRange, o.referenceRange, true); }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case -1413853096: // amount this.amount = castToType(value); // Type return value; case -1424857166: // amountType this.amountType = castToCodeableConcept(value); // CodeableConcept return value; case -1424876123: // amountText this.amountText = castToString(value); // StringType return value; case -1912545102: // referenceRange this.referenceRange = (SubstanceAmountReferenceRangeComponent) value; // SubstanceAmountReferenceRangeComponent return value; default: return super.setProperty(hash, name, value); } }
/** * @return {@link #amount} (Todo.) */ public SubstanceAmount getAmount() { if (this.amount == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SubstancePolymerRepeatRepeatUnitComponent.amount"); else if (Configuration.doAutoCreate()) this.amount = new SubstanceAmount(); // cc return this.amount; }
public SubstancePolymerMonomerSetStartingMaterialComponent copy() { SubstancePolymerMonomerSetStartingMaterialComponent dst = new SubstancePolymerMonomerSetStartingMaterialComponent(); copyValues(dst); dst.material = material == null ? null : material.copy(); dst.type = type == null ? null : type.copy(); dst.isDefining = isDefining == null ? null : isDefining.copy(); dst.amount = amount == null ? null : amount.copy(); return dst; }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("amount[x]")) { this.amount = castToType(value); // Type } else if (name.equals("amountType")) { this.amountType = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("amountText")) { this.amountText = castToString(value); // StringType } else if (name.equals("referenceRange")) { this.referenceRange = (SubstanceAmountReferenceRangeComponent) value; // SubstanceAmountReferenceRangeComponent } else return super.setProperty(name, value); return value; }
/** * @return {@link #amount} (Todo.) */ public SubstanceAmount getAmount() { if (this.amount == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SubstancePolymerMonomerSetStartingMaterialComponent.amount"); else if (Configuration.doAutoCreate()) this.amount = new SubstanceAmount(); // cc return this.amount; }