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