001package org.hl7.fhir.r5.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r5 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.ArrayList; 054import java.util.Date; 055import java.util.List; 056import org.hl7.fhir.exceptions.FHIRException; 057import org.hl7.fhir.instance.model.api.ICompositeType; 058 059import org.hl7.fhir.instance.model.api.IBaseDatatypeElement; 060import ca.uhn.fhir.model.api.annotation.Child; 061import ca.uhn.fhir.model.api.annotation.ChildOrder; 062import ca.uhn.fhir.model.api.annotation.DatatypeDef; 063import ca.uhn.fhir.model.api.annotation.Description; 064import ca.uhn.fhir.model.api.annotation.Block; 065/** 066 * A length - a value with a unit that is a physical distance. 067 */ 068@DatatypeDef(name="Distance") 069public class Distance extends Quantity implements ICompositeType { 070 071 private static final long serialVersionUID = 0L; 072 073 /** 074 * Constructor 075 */ 076 public Distance() { 077 super(); 078 } 079 080 protected void listChildren(List<Property> children) { 081 super.listChildren(children); 082 } 083 084 @Override 085 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 086 switch (_hash) { 087 default: return super.getNamedProperty(_hash, _name, _checkValid); 088 } 089 090 } 091 092 @Override 093 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 094 switch (hash) { 095 default: return super.getProperty(hash, name, checkValid); 096 } 097 098 } 099 100 @Override 101 public Base setProperty(int hash, String name, Base value) throws FHIRException { 102 switch (hash) { 103 default: return super.setProperty(hash, name, value); 104 } 105 106 } 107 108 @Override 109 public Base setProperty(String name, Base value) throws FHIRException { 110 return super.setProperty(name, value); 111 } 112 113 @Override 114 public Base makeProperty(int hash, String name) throws FHIRException { 115 switch (hash) { 116 default: return super.makeProperty(hash, name); 117 } 118 119 } 120 121 @Override 122 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 123 switch (hash) { 124 default: return super.getTypesForProperty(hash, name); 125 } 126 127 } 128 129 @Override 130 public Base addChild(String name) throws FHIRException { 131 return super.addChild(name); 132 } 133 134 public String fhirType() { 135 return "Distance"; 136 137 } 138 139 public Distance copy() { 140 Distance dst = new Distance(); 141 copyValues(dst); 142 return dst; 143 } 144 145 public void copyValues(Distance dst) { 146 super.copyValues(dst); 147 } 148 149 protected Distance typedCopy() { 150 return copy(); 151 } 152 153 @Override 154 public boolean equalsDeep(Base other_) { 155 if (!super.equalsDeep(other_)) 156 return false; 157 if (!(other_ instanceof Distance)) 158 return false; 159 Distance o = (Distance) other_; 160 return true; 161 } 162 163 @Override 164 public boolean equalsShallow(Base other_) { 165 if (!super.equalsShallow(other_)) 166 return false; 167 if (!(other_ instanceof Distance)) 168 return false; 169 Distance o = (Distance) other_; 170 return true; 171 } 172 173 public boolean isEmpty() { 174 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(); 175 } 176 177 178} 179