001package org.hl7.fhir.r4b.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.r4b.model.Enumerations.*; 038import org.hl7.fhir.instance.model.api.IBaseDatatypeElement; 039import org.hl7.fhir.exceptions.FHIRException; 040import org.hl7.fhir.instance.model.api.ICompositeType; 041import org.hl7.fhir.r4b.model.Age; 042import org.hl7.fhir.r4b.model.Base; 043import org.hl7.fhir.r4b.model.Property; 044import org.hl7.fhir.r4b.model.Quantity; 045 046import ca.uhn.fhir.model.api.annotation.Child; 047import ca.uhn.fhir.model.api.annotation.ChildOrder; 048import ca.uhn.fhir.model.api.annotation.DatatypeDef; 049import ca.uhn.fhir.model.api.annotation.Description; 050import ca.uhn.fhir.model.api.annotation.Block; 051 052/** 053 * Base StructureDefinition for Age Type: A duration of time during which an organism (or a process) has existed. 054 */ 055@DatatypeDef(name="Age") 056public class Age extends Quantity implements ICompositeType { 057 058 private static final long serialVersionUID = 0L; 059 060 /** 061 * Constructor 062 */ 063 public Age() { 064 super(); 065 } 066 067 protected void listChildren(List<Property> children) { 068 super.listChildren(children); 069 } 070 071 @Override 072 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 073 switch (_hash) { 074 default: return super.getNamedProperty(_hash, _name, _checkValid); 075 } 076 077 } 078 079 @Override 080 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 081 switch (hash) { 082 default: return super.getProperty(hash, name, checkValid); 083 } 084 085 } 086 087 @Override 088 public Base setProperty(int hash, String name, Base value) throws FHIRException { 089 switch (hash) { 090 default: return super.setProperty(hash, name, value); 091 } 092 093 } 094 095 @Override 096 public Base setProperty(String name, Base value) throws FHIRException { 097 return super.setProperty(name, value); 098 } 099 100 @Override 101 public Base makeProperty(int hash, String name) throws FHIRException { 102 switch (hash) { 103 default: return super.makeProperty(hash, name); 104 } 105 106 } 107 108 @Override 109 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 110 switch (hash) { 111 default: return super.getTypesForProperty(hash, name); 112 } 113 114 } 115 116 @Override 117 public Base addChild(String name) throws FHIRException { 118 return super.addChild(name); 119 } 120 121 public String fhirType() { 122 return "Age"; 123 124 } 125 126 public Age copy() { 127 Age dst = new Age(); 128 copyValues(dst); 129 return dst; 130 } 131 132 public void copyValues(Age dst) { 133 super.copyValues(dst); 134 } 135 136 protected Age typedCopy() { 137 return copy(); 138 } 139 140 @Override 141 public boolean equalsDeep(Base other_) { 142 if (!super.equalsDeep(other_)) 143 return false; 144 if (!(other_ instanceof Age)) 145 return false; 146 Age o = (Age) other_; 147 return true; 148 } 149 150 @Override 151 public boolean equalsShallow(Base other_) { 152 if (!super.equalsShallow(other_)) 153 return false; 154 if (!(other_ instanceof Age)) 155 return false; 156 Age o = (Age) other_; 157 return true; 158 } 159 160 public boolean isEmpty() { 161 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(); 162 } 163 164 165}