From 23a5f47978f028abf3c9bc70581994867288971b Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Fri, 17 Sep 2021 08:59:32 +1000 Subject: [PATCH] add Element.removeChild --- .../src/main/java/org/hl7/fhir/r5/elementmodel/Element.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java index 54785abcb..708ea6854 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java @@ -975,4 +975,8 @@ public class Element extends Base { public List getMessages() { return messages; } + + public void removeChild(String name) { + children.removeIf(n -> name.equals(n.getName())); + } } \ No newline at end of file