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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0
033
034import java.util.*;
035
036import ca.uhn.fhir.model.api.annotation.Child;
037import ca.uhn.fhir.model.api.annotation.ChildOrder;
038import ca.uhn.fhir.model.api.annotation.Description;
039import ca.uhn.fhir.model.api.annotation.DatatypeDef;
040import ca.uhn.fhir.model.api.annotation.Block;
041import org.hl7.fhir.instance.model.api.*;
042import org.hl7.fhir.exceptions.FHIRException;
043/**
044 * A duration of time during which an organism (or a process) has existed.
045 */
046@DatatypeDef(name="Age")
047public class Age extends Quantity implements ICompositeType {
048
049    private static final long serialVersionUID = 0L;
050
051  /**
052   * Constructor
053   */
054    public Age() {
055      super();
056    }
057
058      protected void listChildren(List<Property> children) {
059        super.listChildren(children);
060      }
061
062      @Override
063      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
064        switch (_hash) {
065        default: return super.getNamedProperty(_hash, _name, _checkValid);
066        }
067
068      }
069
070      @Override
071      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
072        switch (hash) {
073        default: return super.getProperty(hash, name, checkValid);
074        }
075
076      }
077
078      @Override
079      public Base setProperty(int hash, String name, Base value) throws FHIRException {
080        switch (hash) {
081        default: 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: return super.makeProperty(hash, name);
095        }
096
097      }
098
099      @Override
100      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
101        switch (hash) {
102        default: return super.getTypesForProperty(hash, name);
103        }
104
105      }
106
107      @Override
108      public Base addChild(String name) throws FHIRException {
109          return super.addChild(name);
110      }
111
112  public String fhirType() {
113    return "Age";
114
115  }
116
117      public Age copy() {
118        Age dst = new Age();
119        copyValues(dst);
120        return dst;
121      }
122
123      protected Age typedCopy() {
124        return copy();
125      }
126
127      @Override
128      public boolean equalsDeep(Base other_) {
129        if (!super.equalsDeep(other_))
130          return false;
131        if (!(other_ instanceof Age))
132          return false;
133        Age o = (Age) other_;
134        return true;
135      }
136
137      @Override
138      public boolean equalsShallow(Base other_) {
139        if (!super.equalsShallow(other_))
140          return false;
141        if (!(other_ instanceof Age))
142          return false;
143        Age o = (Age) other_;
144        return true;
145      }
146
147      public boolean isEmpty() {
148        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty();
149      }
150
151
152}
153