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