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